1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 17:55:06 +00:00

Kernel: Add "child added" and "child removed" InodeWatcher events

The child name is not yet accessible to userspace, but will be in a
future patch.
This commit is contained in:
Andreas Kling 2020-07-04 13:36:55 +02:00
parent ea17d2d3da
commit 0d577ab781
6 changed files with 47 additions and 3 deletions

View file

@ -297,7 +297,7 @@ KResult TmpFSInode::add_child(Inode& child, const StringView& name, mode_t)
FS::DirectoryEntry entry = { owned_name.characters(), owned_name.length(), child.identifier(), 0 };
m_children.set(owned_name, { entry, static_cast<TmpFSInode&>(child) });
notify_watchers();
did_add_child(name);
return KSuccess;
}
@ -313,7 +313,7 @@ KResult TmpFSInode::remove_child(const StringView& name)
if (it == m_children.end())
return KResult(-ENOENT);
m_children.remove(it);
notify_watchers();
did_remove_child(name);
return KSuccess;
}