From 09f0c9a5a394cc00f5a37888a160fdcac37ed7cc Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Wed, 16 Sep 2026 12:14:13 +0200 Subject: [PATCH] F-9253: disk_open accepts GPT or MBR, not GPT-only The @return contract said 'no valid GPT partition table' but disk_open falls back to parsing an MBR when no protective-MBR GPT is present. --- src/disk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/disk.c b/src/disk.c index 53dc9e8d..79114a6c 100644 --- a/src/disk.c +++ b/src/disk.c @@ -117,7 +117,8 @@ static int disk_open_mbr(struct disk_drive *drive, const uint8_t *mbr_sector) * @param[in] drv The drive number to open (0 to `MAX_DISKS - 1`). * * @return The number of partitions found and initialized on success, or -1 if - * the drive cannot be opened or no valid GPT partition table is found. + * the drive cannot be opened or no valid partition table (GPT or MBR) is + * found. */ int disk_open(int drv) {