mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibCore: Add syscall wrapper for fchmod()
This commit is contained in:
parent
aa7e8b5797
commit
fb4ffe22c8
2 changed files with 8 additions and 0 deletions
|
@ -330,6 +330,13 @@ ErrorOr<void> chmod(StringView pathname, mode_t mode)
|
|||
#endif
|
||||
}
|
||||
|
||||
ErrorOr<void> fchmod(int fd, mode_t mode)
|
||||
{
|
||||
if (::fchmod(fd, mode) < 0)
|
||||
return Error::from_syscall("fchmod"sv, -errno);
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> chown(StringView pathname, uid_t uid, gid_t gid)
|
||||
{
|
||||
if (!pathname.characters_without_null_termination())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue