Add Unix domain sockets for local IPC #37

Merged
apio merged 16 commits from unix-sockets into main 2023-07-30 09:49:38 +00:00
3 changed files with 12 additions and 0 deletions
Showing only changes of commit c4e30c3029 - Show all commits

View File

@ -35,6 +35,11 @@ namespace VFS
virtual Result<SharedPtr<Inode>> create_symlink_inode(StringView link) = 0;
virtual Result<u64> allocate_inode_number()
{
return err(ENOTSUP);
}
virtual Result<void> set_mount_dir(SharedPtr<Inode> parent) = 0;
virtual Result<void> reset_mount_dir() = 0;

View File

@ -16,6 +16,11 @@ namespace TmpFS
return (SharedPtr<VFS::FileSystem>)fs;
}
Result<u64> FileSystem::allocate_inode_number()
{
return m_next_inode_number++;
}
Result<SharedPtr<VFS::Inode>> FileSystem::create_file_inode()
{
SharedPtr<FileInode> inode = TRY(make_shared<FileInode>());

View File

@ -18,6 +18,8 @@ namespace TmpFS
Result<SharedPtr<VFS::Inode>> create_device_inode(u32 major, u32 minor) override;
Result<SharedPtr<VFS::Inode>> create_symlink_inode(StringView link) override;
Result<u64> allocate_inode_number() override;
Result<void> set_mount_dir(SharedPtr<VFS::Inode> parent) override;
Result<void> reset_mount_dir() override;