bios: Skip disks which return bogus geometry

This commit is contained in:
mintsuki 2021-03-28 20:30:13 +02:00
parent 38bbc1eac4
commit bd0a713c1c

View File

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