mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 08:06:09 +00:00
Kernel/Ramdisk: Propagate error during Ramdisk initialize
Use the same pattern for Ramdisk similar to other storage devices during device initialization. This will propagate errors if the Ramdisk fails to initialize.
This commit is contained in:
committed by
Andreas Kling
parent
b204da94b0
commit
6ff85aa19a
@@ -444,7 +444,12 @@ UNMAP_AFTER_INIT void StorageManagement::initialize(StringView root_device, bool
|
||||
}
|
||||
// Note: Whether PCI bus is present on the system or not, always try to attach
|
||||
// a given ramdisk.
|
||||
m_controllers.append(RamdiskController::initialize());
|
||||
auto controller = RamdiskController::try_initialize();
|
||||
if (controller.is_error()) {
|
||||
dmesgln("Unable to initialize RAM controller: {}", controller.error());
|
||||
} else {
|
||||
m_controllers.append(controller.release_value());
|
||||
}
|
||||
enumerate_storage_devices();
|
||||
enumerate_disk_partitions();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user