1
Fork 0
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:
Andreas Kling 2018-10-26 18:43:25 +02:00
parent a447359916
commit 81627cf7d5
6 changed files with 46 additions and 17 deletions

View file

@ -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);
}
}