|
@@ -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 */
|