mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-27 07:44:09 +02:00
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
|
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 */
|
/* Process primary partition table 1 partition only */
|
||||||
|
bootdrv = *(UBYTE FAR *)MK_FP(0,0x5e0);
|
||||||
for (HardDrive = 0; HardDrive < nHardDisk; HardDrive++)
|
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);
|
ProcessDisk(SCAN_PRIMARYBOOT, HardDrive, 0);
|
||||||
|
|
||||||
if (foundPartitions[HardDrive] == 0)
|
if (foundPartitions[HardDrive] == 0)
|
||||||
|
@ -158,6 +158,11 @@ cont: mov ax,cs
|
|||||||
int 010h
|
int 010h
|
||||||
popf
|
popf
|
||||||
pop bx
|
pop bx
|
||||||
|
|
||||||
|
xor ax,ax
|
||||||
|
mov es,ax
|
||||||
|
mov [es:0x5e0], bl ; store orig bootdrive:used by initdisk
|
||||||
|
|
||||||
pop ax
|
pop ax
|
||||||
|
|
||||||
inc bl
|
inc bl
|
||||||
|
Loading…
x
Reference in New Issue
Block a user