mirror of https://github.com/FDOS/kernel.git
From Michal Bakowski <mb@orad.pl>:
Change the boot drive to always be C: if DLASortByDriveNo==1 git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@697 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
f489b1a1b1
commit
d38750a538
|
@ -1333,12 +1333,32 @@ void ReadAllPartitionTables(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
printf("Drive Letter Assignment - sorted by drive\n");
|
||||
UBYTE bootdrv;
|
||||
struct DriveParamS driveParam;
|
||||
|
||||
/* printf("Drive Letter Assignment - sorted by drive\n"); */
|
||||
|
||||
/* Process primary partition table 1 partition only */
|
||||
bootdrv = *(UBYTE FAR *)MK_FP(0,0x5e0);
|
||||
for (HardDrive = 0; HardDrive < nHardDisk; HardDrive++)
|
||||
{
|
||||
foundPartitions[HardDrive] =
|
||||
memset(&driveParam, 0, sizeof(driveParam));
|
||||
ExtLBAForce = FALSE;
|
||||
if (LBA_Get_Drive_Parameters(HardDrive, &driveParam))
|
||||
{
|
||||
if (driveParam.driveno == bootdrv)
|
||||
{
|
||||
foundPartitions[HardDrive] =
|
||||
ProcessDisk(SCAN_PRIMARYBOOT, HardDrive, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (HardDrive = 0; HardDrive < nHardDisk; HardDrive++)
|
||||
{
|
||||
if (foundPartitions[HardDrive] == 0)
|
||||
foundPartitions[HardDrive] =
|
||||
ProcessDisk(SCAN_PRIMARYBOOT, HardDrive, 0);
|
||||
|
||||
if (foundPartitions[HardDrive] == 0)
|
||||
|
|
|
@ -158,6 +158,11 @@ cont: mov ax,cs
|
|||
int 010h
|
||||
popf
|
||||
pop bx
|
||||
|
||||
xor ax,ax
|
||||
mov es,ax
|
||||
mov [es:0x5e0], bl ; store orig bootdrive:used by initdisk
|
||||
|
||||
pop ax
|
||||
|
||||
inc bl
|
||||
|
|
Loading…
Reference in New Issue