ioctl() IOCTL_MKDIR command, vfs_mkdir()

This commit is contained in:
2025-10-04 01:38:41 +02:00
parent b72f3ee00d
commit 26517e8e28
6 changed files with 46 additions and 0 deletions

View File

@ -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;