mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 15:54:58 +00:00
Add a simple /proc/mounts that enumerates the current VFS mounts.
This commit is contained in:
parent
a447359916
commit
81627cf7d5
6 changed files with 46 additions and 17 deletions
|
@ -501,3 +501,10 @@ void VirtualFileSystem::registerCharacterDevice(unsigned major, unsigned minor,
|
|||
{
|
||||
m_characterDevices.set(encodedDevice(major, minor), &device);
|
||||
}
|
||||
|
||||
void VirtualFileSystem::forEachMount(Function<void(const Mount&)> callback) const
|
||||
{
|
||||
for (auto& mount : m_mounts) {
|
||||
callback(*mount);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue