mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +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:
parent
b204da94b0
commit
6ff85aa19a
3 changed files with 9 additions and 4 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue