* booting from hard disk now always sets the default drive to C:,

not D: if booting from the second physical hard disk, etc (bug #1062).


git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@354 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
Bart Oldeman 2002-02-17 10:39:35 +00:00
parent b2496a6fbd
commit bbbd0ce42f
3 changed files with 13 additions and 16 deletions

View File

@ -12,6 +12,8 @@
* allow creating, renaming and deleting volume labels using FCBs
* fix renaming with wildcards using FCBs
* some dosfns.c and fcbfns.c clean-ups
* booting from hard disk now always sets the default drive to C:,
not D: if booting from the second physical hard disk, etc (bug #1062).
2002 Feb 9 - Build 2026
-------- Bart Oldeman (bart@dosemu.org)
+ Changes Tom

View File

@ -174,7 +174,7 @@ cont: ; inititalize api stacks for high water tests
inc bl
jns floppy
add bl,3-1-128
mov bl,3 ; set to C: if hard disk
floppy: mov byte [_BootDrive],bl ; tell where we came from
;!! int 11h

View File

@ -151,26 +151,21 @@ VOID ASMCFUNC FreeDOSmain(void)
*/
if (fmemcmp(MK_FP(0x50,0xe0+2),"CONFIG",6) == 0) /* UPX */
{
fmemcpy(&InitKernelConfig, MK_FP(0x50,0xe0+2), sizeof(InitKernelConfig));
{
fmemcpy(&InitKernelConfig, MK_FP(0x50,0xe0+2), sizeof(InitKernelConfig));
BootDrive = *(BYTE FAR *)MK_FP(0x50,0xe0);
BootDrive ++;
BootDrive = *(BYTE FAR *)MK_FP(0x50,0xe0) + 1;
if ((unsigned)BootDrive >= 0x80)
BootDrive += 3-1-128;
BootDrive = 3; /* C: */
*(DWORD FAR *)MK_FP(0x50,0xe0+2) = 0;
}
*(DWORD FAR *)MK_FP(0x50,0xe0+2) = 0;
}
else
{
fmemcpy(&InitKernelConfig, &LowKernelConfig, sizeof(InitKernelConfig));
}
{
fmemcpy(&InitKernelConfig, &LowKernelConfig, sizeof(InitKernelConfig));
}
setvec(0, int0_handler); /* zero divide */
setvec(1, empty_handler); /* single step */
setvec(3, empty_handler); /* debug breakpoint */