From b0addbe14d2353e9c33f7f4d8a0b4ba8b24b2bd9 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 7 Aug 2022 23:50:15 +0200 Subject: user/shell: make `whitelist` work in a more sensible way doesn't need to be a shell builtin now --- src/user/app/shell/shell.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/user/app/shell/shell.c') diff --git a/src/user/app/shell/shell.c b/src/user/app/shell/shell.c index 505997a..6083578 100644 --- a/src/user/app/shell/shell.c +++ b/src/user/app/shell/shell.c @@ -33,7 +33,7 @@ static void execp(char **argv) { free(s); } -static void run_args(int argc, char **argv, struct redir *redir) { +void run_args(int argc, char **argv, struct redir *redir) { if (!*argv) return; /* "special" commands that can't be handled in a subprocess */ @@ -41,11 +41,6 @@ static void run_args(int argc, char **argv, struct redir *redir) { // TODO process groups _syscall_mount(-1, argv[1], strlen(argv[1])); return; - } else if (!strcmp(argv[0], "whitelist")) { - MOUNT_AT("/") { - fs_whitelist((void*)&argv[1]); - } - return; } else if (!strcmp(argv[0], "time")) { uint64_t time = __rdtsc(); uint64_t div = 3000; @@ -62,7 +57,7 @@ static void run_args(int argc, char **argv, struct redir *redir) { return; } - if (redir->stdout) { + if (redir && redir->stdout) { FILE *f = fopen(redir->stdout, redir->append ? "a" : "w"); if (!f) { eprintf("couldn't open %s for redirection", redir->stdout); -- cgit v1.2.3