Kernel: Implement TmpFS inode chmod

This commit is contained in:
Bananymous 2023-11-06 20:11:34 +02:00
parent ba2f09a4e6
commit c3ed700324
2 changed files with 8 additions and 0 deletions

View File

@ -69,6 +69,8 @@ namespace Kernel
virtual BAN::ErrorOr<size_t> read_impl(off_t, BAN::ByteSpan) override;
virtual BAN::ErrorOr<size_t> write_impl(off_t, BAN::ConstByteSpan) override;
virtual BAN::ErrorOr<void> truncate_impl(size_t) override;
virtual BAN::ErrorOr<void> chmod_impl(mode_t) override;
virtual bool has_data_impl() const override { return true; }
private:
TmpFileInode(TmpFileSystem&, ino_t, const TmpInodeInfo&);

View File

@ -199,6 +199,12 @@ namespace Kernel
return {};
}
BAN::ErrorOr<void> TmpFileInode::chmod_impl(mode_t new_mode)
{
m_inode_info.mode = new_mode;
return {};
}
/* DIRECTORY INODE */
BAN::ErrorOr<BAN::RefPtr<TmpDirectoryInode>> TmpDirectoryInode::create_root(TmpFileSystem& fs, mode_t mode, uid_t uid, gid_t gid)