From 1252bdeaf795629ac34161bc59a263e998483247 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 8 Aug 2022 01:00:48 +0200 Subject: user: separate tmpfs into its own executable, add `mount` --- src/user/app/shell/shell.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/user/app/shell') 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(); -- cgit v1.2.3