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

This commit is contained in:
Andreas Kling 2020-01-06 11:05:59 +01:00
commit 0df72d4712
Notes: sideshowbarker 2024-07-19 10:18:59 +09:00
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);
}