diff --git a/Kernel/Devices/MBRPartitionTable.cpp b/Kernel/Devices/MBRPartitionTable.cpp index 369be452e1..b194855b3e 100644 --- a/Kernel/Devices/MBRPartitionTable.cpp +++ b/Kernel/Devices/MBRPartitionTable.cpp @@ -53,9 +53,17 @@ RetainPtr MBRPartitionTable::partition(unsigned index) kprintf("MBRPartitionTable::partition: status=%#x offset=%#x\n", entry.status, entry.offset); #endif - if (entry.status == 0x00) { + if (entry.offset == 0x00) { +#ifdef MBR_DEBUG + kprintf("MBRPartitionTable::partition: missing partition requested index=%d\n", index); +#endif + return nullptr; } +#ifdef MBR_DEBUG + kprintf("MBRPartitionTable::partition: found partition index=%d type=%x\n", index, entry.type); +#endif + return DiskPartition::create(m_device.copy_ref(), entry.offset); }