|
@@ -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 );
|