mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
Finally hook up the mkdir code to a syscall.
Added a /bin/mkdir that makes directories. How very neat :^) There are various limitations because of missing functionality.
This commit is contained in:
parent
303577df16
commit
de4604ac95
26 changed files with 238 additions and 132 deletions
|
@ -1751,3 +1751,15 @@ int Process::sys$setgroups(size_t count, const gid_t* gids)
|
|||
m_gids.set(gids[i]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Process::sys$mkdir(const char* pathname, mode_t mode)
|
||||
{
|
||||
if (!validate_read_str(pathname))
|
||||
return -EFAULT;
|
||||
if (strlen(pathname) >= 255)
|
||||
return -ENAMETOOLONG;
|
||||
int error;
|
||||
if (!VFS::the().mkdir(pathname, mode, cwd_inode()->identifier(), error))
|
||||
return error;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue