ioctl() IOCTL_MKDIR command, vfs_mkdir()
This commit is contained in:
@ -177,6 +177,23 @@ int32_t SYSCALL5(sys_ioctl, ioh1, cmd1, arg1, arg2, arg3) {
|
||||
|
||||
ret = vfs_fetchdirent(mp, path, direntbuf, idx);
|
||||
} break;
|
||||
case IOCTL_MKDIR: {
|
||||
const char *opath = (const char *)arg1;
|
||||
|
||||
if (opath == NULL) {
|
||||
ret = E_INVALIDARGUMENT;
|
||||
goto done;
|
||||
}
|
||||
|
||||
size_t idx = (size_t)arg3;
|
||||
|
||||
char mp[IOCTL_MP_MAX];
|
||||
char path[IOCTL_PATH_MAX];
|
||||
|
||||
path_parse(opath, mp, path);
|
||||
|
||||
ret = vfs_mkdir(mp, path);
|
||||
} break;
|
||||
default: {
|
||||
ret = E_INVALIDARGUMENT;
|
||||
goto done;
|
||||
|
Reference in New Issue
Block a user