mirror of
https://github.com/ipxe/ipxe
synced 2025-12-15 17:12:54 +03:00
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.
This commit is contained in:
@@ -543,8 +543,9 @@ void register_int13_drive ( struct int13_drive *drive ) {
|
|||||||
|
|
||||||
/* Assign drive number if none specified, update BIOS drive count */
|
/* Assign drive number if none specified, update BIOS drive count */
|
||||||
get_real ( num_drives, BDA_SEG, BDA_NUM_DRIVES );
|
get_real ( num_drives, BDA_SEG, BDA_NUM_DRIVES );
|
||||||
if ( ! drive->drive )
|
if ( ( drive->drive & 0xff ) == 0xff )
|
||||||
drive->drive = ( num_drives | 0x80 );
|
drive->drive = num_drives;
|
||||||
|
drive->drive |= 0x80;
|
||||||
num_drives++;
|
num_drives++;
|
||||||
if ( num_drives <= ( drive->drive & 0x7f ) )
|
if ( num_drives <= ( drive->drive & 0x7f ) )
|
||||||
num_drives = ( ( drive->drive & 0x7f ) + 1 );
|
num_drives = ( ( drive->drive & 0x7f ) + 1 );
|
||||||
|
|||||||
Reference in New Issue
Block a user