1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 16:24:59 +00:00

Kernel: Move device lookup to Device class itself

Previously, VFS stored a list of all devices, and devices had to
register and unregister themselves with it. This cleans up things
a bit.
This commit is contained in:
Sergey Bugaev 2019-08-18 14:48:15 +03:00 committed by Andreas Kling
parent d5352b87b7
commit acccf9ccda
6 changed files with 38 additions and 32 deletions

View file

@ -2764,7 +2764,7 @@ int Process::sys$mount(const char* device_path, const char* mountpoint, const ch
auto major = metadata_or_error.value().major_device;
auto minor = metadata_or_error.value().minor_device;
auto* device = VFS::the().get_device(major, minor);
auto* device = Device::get_device(major, minor);
if (!device) {
dbg() << "mount: device (" << major << "," << minor << ") not found";
return -ENODEV;