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:
parent
d5352b87b7
commit
acccf9ccda
6 changed files with 38 additions and 32 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue