From 10a7d39c66e16c986a7855ece3d99e64aabbdf6d Mon Sep 17 00:00:00 2001 From: mintsuki Date: Sat, 19 Aug 2023 08:04:43 -0500 Subject: [PATCH] disk: BIOS: Skip drive if sector size is 0. Fixes #294 --- common/drivers/disk.s2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/drivers/disk.s2.c b/common/drivers/disk.s2.c index 6f7decbe..31709d06 100644 --- a/common/drivers/disk.s2.c +++ b/common/drivers/disk.s2.c @@ -218,6 +218,10 @@ static bool detect_sector_size(struct volume *volume) { volume->sector_size = sector_size_a > sector_size_b ? sector_size_a : sector_size_b; + if (volume->sector_size == 0) { + return false; + } + return true; }