mirror of
https://github.com/limine-bootloader/limine
synced 2024-12-04 14:11:58 +03:00
bios: Skip disks which return bogus geometry
This commit is contained in:
parent
38bbc1eac4
commit
bd0a713c1c
@ -99,6 +99,9 @@ void disk_create_index(void) {
|
||||
if (r.eflags & EFLAGS_CF)
|
||||
continue;
|
||||
|
||||
if (drive_params.lba_count == 0 || drive_params.bytes_per_sect == 0)
|
||||
continue;
|
||||
|
||||
print("Found BIOS drive %x\n", drive);
|
||||
print(" ... %X total %u-byte sectors\n",
|
||||
drive_params.lba_count, drive_params.bytes_per_sect);
|
||||
@ -150,6 +153,9 @@ void disk_create_index(void) {
|
||||
if (r.eflags & EFLAGS_CF)
|
||||
continue;
|
||||
|
||||
if (drive_params.lba_count == 0 || drive_params.bytes_per_sect == 0)
|
||||
continue;
|
||||
|
||||
struct volume *block = ext_mem_alloc(sizeof(struct volume));
|
||||
|
||||
block->drive = drive;
|
||||
|
Loading…
Reference in New Issue
Block a user