FileSystem: Rename VFS::fchmod() -> chmod().

This commit is contained in:
Andreas Kling 2019-06-02 12:36:38 +02:00
parent e67bfdb7f6
commit a53c922f8a
Notes: sideshowbarker 2024-07-19 13:47:10 +09:00
3 changed files with 4 additions and 4 deletions

View File

@ -88,7 +88,7 @@ KResult FileDescriptor::fchmod(mode_t mode)
{ {
if (!m_inode) if (!m_inode)
return KResult(-EBADF); return KResult(-EBADF);
return VFS::the().fchmod(*m_inode, mode); return VFS::the().chmod(*m_inode, mode);
} }
off_t FileDescriptor::seek(off_t offset, int whence) off_t FileDescriptor::seek(off_t offset, int whence)

View File

@ -317,7 +317,7 @@ KResultOr<Retained<Custody>> VFS::open_directory(StringView path, Custody& base)
return custody; return custody;
} }
KResult VFS::fchmod(Inode& inode, mode_t mode) KResult VFS::chmod(Inode& inode, mode_t mode)
{ {
if (inode.fs().is_readonly()) if (inode.fs().is_readonly())
return KResult(-EROFS); return KResult(-EROFS);
@ -337,7 +337,7 @@ KResult VFS::chmod(StringView path, mode_t mode, Custody& base)
return custody_or_error.error(); return custody_or_error.error();
auto& custody = *custody_or_error.value(); auto& custody = *custody_or_error.value();
auto& inode = custody.inode(); auto& inode = custody.inode();
return fchmod(inode, mode); return chmod(inode, mode);
} }
KResult VFS::rename(StringView old_path, StringView new_path, Custody& base) KResult VFS::rename(StringView old_path, StringView new_path, Custody& base)

View File

@ -68,7 +68,7 @@ public:
KResult symlink(StringView target, StringView linkpath, Custody& base); KResult symlink(StringView target, StringView linkpath, Custody& base);
KResult rmdir(StringView path, Custody& base); KResult rmdir(StringView path, Custody& base);
KResult chmod(StringView path, mode_t, Custody& base); KResult chmod(StringView path, mode_t, Custody& base);
KResult fchmod(Inode&, mode_t); KResult chmod(Inode&, mode_t);
KResult chown(StringView path, uid_t, gid_t, Custody& base); KResult chown(StringView path, uid_t, gid_t, Custody& base);
KResult chown(Inode&, uid_t, gid_t); KResult chown(Inode&, uid_t, gid_t);
KResult access(StringView path, int mode, Custody& base); KResult access(StringView path, int mode, Custody& base);