1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

Kernel/Storage: Dump detected devices and partitions before PANIC()'ing

If we panic the kernel for a storage-related reason, we might as well be
helpful and print out a list of detected storage devices and their
partitions to help with debugging.

Reasons for such a panic include:
- No boot device with the given name found
- No boot device with the given UUID found
- Failing to open the root filesystem after determining a boot device
This commit is contained in:
Linus Groh 2022-01-26 19:47:30 +00:00
parent d8fb3290d5
commit c05feaaa74
2 changed files with 26 additions and 0 deletions

View file

@ -43,6 +43,8 @@ private:
void determine_boot_device();
void determine_boot_device_with_partition_uuid();
void dump_storage_devices_and_partitions() const;
OwnPtr<PartitionTable> try_to_initialize_partition_table(const StorageDevice&) const;
RefPtr<BlockDevice> boot_block_device() const;