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:
parent
ea17d2d3da
commit
0d577ab781
6 changed files with 47 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue