mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 06:18:59 +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
Notes:
sideshowbarker
2024-07-19 05:11:34 +09:00
Author: https://github.com/awesomekling
Commit: 0d577ab781
6 changed files with 47 additions and 3 deletions
|
@ -981,6 +981,8 @@ KResult Ext2FSInode::add_child(Inode& child, const StringView& name, mode_t mode
|
|||
bool success = write_directory(entries);
|
||||
if (success)
|
||||
m_lookup_cache.set(name, child.index());
|
||||
|
||||
did_add_child(name);
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
|
@ -1022,6 +1024,8 @@ KResult Ext2FSInode::remove_child(const StringView& name)
|
|||
|
||||
auto child_inode = fs().get_inode(child_id);
|
||||
child_inode->decrement_link_count();
|
||||
|
||||
did_remove_child(name);
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue