1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

Kernel: Pass path+length to mkdir(), rmdir() and chmod()

This commit is contained in:
Andreas Kling 2020-01-06 11:05:59 +01:00
parent 53d3b6b0a7
commit 0df72d4712
4 changed files with 47 additions and 26 deletions

View file

@ -331,7 +331,11 @@ int symlink(const char* target, const char* linkpath)
int rmdir(const char* pathname)
{
int rc = syscall(SC_rmdir, pathname);
if (!pathname) {
errno = EFAULT;
return -1;
}
int rc = syscall(SC_rmdir, pathname, strlen(pathname));
__RETURN_WITH_ERRNO(rc, rc, -1);
}