Skip to content

Commit

Permalink
posix: Emit createEvent in tmpfs when making directories, devices, fi…
Browse files Browse the repository at this point in the history
…fos and sockets
  • Loading branch information
Dennisbonke committed Mar 17, 2024
1 parent d4019f7 commit f66747c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions posix/subsystem/src/tmp_fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ DirectoryNode::mkdir(std::string name) {
auto link = std::make_shared<Link>(shared_from_this(), std::move(name), std::move(node));
the_node->_treeLink = link;
_entries.insert(link);
notifyObservers(FsObserver::createEvent, name, 0);
co_return link;
}

Expand All @@ -758,6 +759,7 @@ DirectoryNode::mkdev(std::string name, VfsType type, DeviceId id) {
type, id);
auto link = std::make_shared<Link>(shared_from_this(), std::move(name), std::move(node));
_entries.insert(link);
notifyObservers(FsObserver::createEvent, name, 0);
co_return link;
}

Expand All @@ -768,6 +770,7 @@ DirectoryNode::mkfifo(std::string name, mode_t mode) {
auto node = std::make_shared<FifoNode>(static_cast<Superblock *>(superblock()), mode);
auto link = std::make_shared<Link>(shared_from_this(), std::move(name), std::move(node));
_entries.insert(link);
notifyObservers(FsObserver::createEvent, name, 0);
co_return link;
}

Expand All @@ -777,6 +780,7 @@ async::result<frg::expected<Error, std::shared_ptr<FsLink>>> DirectoryNode::mkso
auto node = std::make_shared<SocketNode>(static_cast<Superblock *>(superblock()));
auto link = std::make_shared<Link>(shared_from_this(), std::move(name), std::move(node));
_entries.insert(link);
notifyObservers(FsObserver::createEvent, name, 0);
co_return link;
}

Expand Down

0 comments on commit f66747c

Please sign in to comment.