[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

svn path=/trunk/; revision=52286
This commit is contained in:
Cameron Gutman 2011-06-16 23:38:35 +00:00
parent 9031a3a34b
commit 5a22829110
3 changed files with 3 additions and 3 deletions

View file

@ -323,7 +323,7 @@ Fat12Format(IN HANDLE FileHandle,
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))

View file

@ -330,7 +330,7 @@ Fat16Format(IN HANDLE FileHandle,
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))

View file

@ -408,7 +408,7 @@ Fat32Format(IN HANDLE FileHandle,
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))