Browse Source

Always increase number of BIOS drives when registering

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
cd7e296cbe
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      src/arch/i386/interface/pcbios/int13.c

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

@@ -580,11 +580,9 @@ void register_int13_drive ( struct int13_drive *drive ) {
580 580
 	get_real ( num_drives, BDA_SEG, BDA_NUM_DRIVES );
581 581
 	if ( ! drive->drive )
582 582
 		drive->drive = ( num_drives | 0x80 );
583
+	num_drives++;
583 584
 	if ( num_drives <= ( drive->drive & 0x7f ) )
584 585
 		num_drives = ( ( drive->drive & 0x7f ) + 1 );
585
-
586
-	num_drives = 2;
587
-
588 586
 	put_real ( num_drives, BDA_SEG, BDA_NUM_DRIVES );
589 587
 
590 588
 	DBG ( "Registered INT13 drive %02x with C/H/S geometry %d/%d/%d\n",
@@ -612,6 +610,10 @@ void unregister_int13_drive ( struct int13_drive *drive ) {
612 610
 	/* Remove from list of emulated drives */
613 611
 	list_del ( &drive->list );
614 612
 
613
+	/* Should adjust BIOS drive count, but it's difficult to do so
614
+	 * reliably.
615
+	 */
616
+
615 617
 	DBG ( "Unregistered INT13 drive %02x\n", drive->drive );
616 618
 
617 619
 	/* Unhook INT 13 vector if no more drives */

Loading…
Cancel
Save