mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-24 02:09:28 +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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user