Browse Source

Auto-assign drive number only if set to 0xff; almost all applications

require that we use drive 0x80, so it should probably be the default.
tags/v0.9.3
Michael Brown 17 years ago
parent
commit
01b755704a
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      src/arch/i386/interface/pcbios/int13.c

+ 3
- 2
src/arch/i386/interface/pcbios/int13.c View File

@@ -543,8 +543,9 @@ void register_int13_drive ( struct int13_drive *drive ) {
543 543
 
544 544
 	/* Assign drive number if none specified, update BIOS drive count */
545 545
 	get_real ( num_drives, BDA_SEG, BDA_NUM_DRIVES );
546
-	if ( ! drive->drive )
547
-		drive->drive = ( num_drives | 0x80 );
546
+	if ( ( drive->drive & 0xff ) == 0xff )
547
+		drive->drive = num_drives;
548
+	drive->drive |= 0x80;
548 549
 	num_drives++;
549 550
 	if ( num_drives <= ( drive->drive & 0x7f ) )
550 551
 		num_drives = ( ( drive->drive & 0x7f ) + 1 );

Loading…
Cancel
Save