1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

Kernel: Implement fchdir syscall

The fchdir() function is equivalent to chdir() except that the
directory that is to be the new current working directory is
specified by a file descriptor.
This commit is contained in:
Mauri de Souza Nunes 2019-09-11 20:18:25 -03:00 committed by Andreas Kling
parent 26e81ad574
commit 7d85fc00e4
6 changed files with 24 additions and 0 deletions

View file

@ -265,6 +265,12 @@ int chdir(const char* path)
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int fchdir(int fd)
{
int rc = syscall(SC_fchdir, fd);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
char* getcwd(char* buffer, size_t size)
{
if (!buffer) {