mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-19 00:31:52 +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
Notes:
sideshowbarker
2024-07-19 12:36:40 +09:00
Author: https://github.com/bugaevc
Commit: acccf9ccda
Pull-request: https://github.com/SerenityOS/serenity/pull/465
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