diff options
author | dzwdz | 2022-08-08 01:00:48 +0200 |
---|---|---|
committer | dzwdz | 2022-08-08 01:00:48 +0200 |
commit | 1252bdeaf795629ac34161bc59a263e998483247 (patch) | |
tree | 05d2fcba83fe0eb1f3d18044decca10dcea184c6 /src/user/app/shell/shell.c | |
parent | b99d66ce12b4a1a0dd452d8a38006eede0c05cf2 (diff) |
user: separate tmpfs into its own executable, add `mount`
Diffstat (limited to 'src/user/app/shell/shell.c')
-rw-r--r-- | src/user/app/shell/shell.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/user/app/shell/shell.c b/src/user/app/shell/shell.c index 6083578..d96ef4c 100644 --- a/src/user/app/shell/shell.c +++ b/src/user/app/shell/shell.c @@ -37,9 +37,15 @@ void run_args(int argc, char **argv, struct redir *redir) { if (!*argv) return; /* "special" commands that can't be handled in a subprocess */ - if (!strcmp(argv[0], "shadow")) { - // TODO process groups - _syscall_mount(-1, argv[1], strlen(argv[1])); + if (!strcmp(argv[0], "mount")) { + if (argc < 3) { + eprintf("not enough arguments"); + return; + } + MOUNT_AT(argv[1]) { + run_args(argc - 2, argv + 2, redir); + exit(1); + } return; } else if (!strcmp(argv[0], "time")) { uint64_t time = __rdtsc(); |