Author: cgutman Date: Thu Jun 16 23:38:35 2011 New Revision: 52286
URL: http://svn.reactos.org/svn/reactos?rev=52286&view=rev Log: [VFATLIB] - Set the BIOS drive number depending on the media type (independent of the actual number of drives) because it's only relevant for the boot drive - See http://support.microsoft.com/kb/140418 for details
Modified: trunk/reactos/lib/fslib/vfatlib/fat12.c trunk/reactos/lib/fslib/vfatlib/fat16.c trunk/reactos/lib/fslib/vfatlib/fat32.c
Modified: trunk/reactos/lib/fslib/vfatlib/fat12.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/vfatlib/fat12.c?r... ============================================================================== --- trunk/reactos/lib/fslib/vfatlib/fat12.c [iso-8859-1] (original) +++ trunk/reactos/lib/fslib/vfatlib/fat12.c [iso-8859-1] Thu Jun 16 23:38:35 2011 @@ -323,7 +323,7 @@ BootSector.Heads = DiskGeometry->TracksPerCylinder; BootSector.HiddenSectors = PartitionInfo->HiddenSectors; BootSector.SectorsHuge = (SectorCount >= 0x10000) ? (unsigned long)SectorCount : 0; - BootSector.Drive = 0xff; /* No BIOS boot drive available */ + BootSector.Drive = DiskGeometry->MediaType == FixedMedia ? 0x80 : 0x00; BootSector.ExtBootSignature = 0x29; BootSector.VolumeID = CalcVolumeSerialNumber(); if ((Label == NULL) || (Label->Buffer == NULL))
Modified: trunk/reactos/lib/fslib/vfatlib/fat16.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/vfatlib/fat16.c?r... ============================================================================== --- trunk/reactos/lib/fslib/vfatlib/fat16.c [iso-8859-1] (original) +++ trunk/reactos/lib/fslib/vfatlib/fat16.c [iso-8859-1] Thu Jun 16 23:38:35 2011 @@ -330,7 +330,7 @@ BootSector.Heads = DiskGeometry->TracksPerCylinder; BootSector.HiddenSectors = PartitionInfo->HiddenSectors; BootSector.SectorsHuge = (SectorCount >= 0x10000) ? (unsigned long)SectorCount : 0; - BootSector.Drive = 0xff; /* No BIOS boot drive available */ + BootSector.Drive = DiskGeometry->MediaType == FixedMedia ? 0x80 : 0x00; BootSector.ExtBootSignature = 0x29; BootSector.VolumeID = CalcVolumeSerialNumber(); if ((Label == NULL) || (Label->Buffer == NULL))
Modified: trunk/reactos/lib/fslib/vfatlib/fat32.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/vfatlib/fat32.c?r... ============================================================================== --- trunk/reactos/lib/fslib/vfatlib/fat32.c [iso-8859-1] (original) +++ trunk/reactos/lib/fslib/vfatlib/fat32.c [iso-8859-1] Thu Jun 16 23:38:35 2011 @@ -408,7 +408,7 @@ BootSector.RootCluster = 2; BootSector.FSInfoSector = 1; BootSector.BootBackup = 6; - BootSector.Drive = 0xff; /* No BIOS boot drive available */ + BootSector.Drive = DiskGeometry->MediaType == FixedMedia ? 0x80 : 0x00; BootSector.ExtBootSignature = 0x29; BootSector.VolumeID = CalcVolumeSerialNumber (); if ((Label == NULL) || (Label->Buffer == NULL))