1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:15:07 +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

@ -69,7 +69,7 @@ RefPtr<Inode> DevPtsFS::get_inode(InodeIdentifier inode_id) const
return m_root_inode;
unsigned pty_index = inode_index_to_pty_index(inode_id.index());
auto* device = VFS::the().get_device(11, pty_index);
auto* device = Device::get_device(11, pty_index);
ASSERT(device);
auto inode = adopt(*new DevPtsFSInode(const_cast<DevPtsFS&>(*this), inode_id.index()));