mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:38:11 +00:00
Kernel+Userland: Implement fchmod() syscall and use it to improve /bin/cp.
/bin/cp will now copy the permission bits from source to destination. :^)
This commit is contained in:
parent
b5e5f26a82
commit
1b16a29044
10 changed files with 54 additions and 14 deletions
|
@ -25,8 +25,8 @@ int chmod(const char* pathname, mode_t mode)
|
|||
|
||||
int fchmod(int fd, mode_t mode)
|
||||
{
|
||||
dbgprintf("FIXME(LibC): fchmod(%d, %o)\n", fd, mode);
|
||||
ASSERT_NOT_REACHED();
|
||||
int rc = syscall(SC_fchmod, fd, mode);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue