1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

Kernel/Devices: Remove required_mode and device_name methods

These methods are no longer needed because SystemServer is able to
populate the DevFS on its own.

Device absolute_path no longer assume a path to the /dev location,
because it really should not assume any path to a Device node.

Because StorageManagement still needs to know the storage name, we
declare a virtual method only for StorageDevices to override, but this
technique should really be removed later on.
This commit is contained in:
Liav A 2021-08-14 07:01:19 +03:00 committed by Andreas Kling
parent 4f04cb98c1
commit 21b6d84ff0
38 changed files with 18 additions and 141 deletions

View file

@ -126,15 +126,12 @@ UNMAP_AFTER_INIT void StorageManagement::determine_boot_device()
{
VERIFY(!m_controllers.is_empty());
if (m_boot_argument.starts_with("/dev/")) {
StringView device_name = m_boot_argument.substring_view(5);
Device::for_each([&](Device& device) {
if (device.is_block_device()) {
auto& block_device = static_cast<BlockDevice&>(device);
if (device.device_name() == device_name) {
m_boot_block_device = block_device;
}
StringView storage_name = m_boot_argument.substring_view(5);
for (auto& storage_device : m_storage_devices) {
if (storage_device.storage_name() == storage_name) {
m_boot_block_device = storage_device;
}
});
}
}
if (m_boot_block_device.is_null()) {