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.
pull/892/head
Daniele Lacamera 2026-09-16 12:14:13 +02:00
parent 9f456bf864
commit 09f0c9a5a3
1 changed files with 2 additions and 1 deletions

View File

@ -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`). * @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 * @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) int disk_open(int drv)
{ {