diff options
author | dzwdz | 2022-08-07 23:50:15 +0200 |
---|---|---|
committer | dzwdz | 2022-08-07 23:50:15 +0200 |
commit | b0addbe14d2353e9c33f7f4d8a0b4ba8b24b2bd9 (patch) | |
tree | 0831f7c86e41ca2933e6dc5ec02c2d8b7078cd73 /src/user/app/shell/shell.c | |
parent | bd6af34828a9075edbda7f09011175d0bd11143f (diff) |
user/shell: make `whitelist` work in a more sensible way
doesn't need to be a shell builtin now
Diffstat (limited to 'src/user/app/shell/shell.c')
-rw-r--r-- | src/user/app/shell/shell.c | 9 |
1 files changed, 2 insertions, 7 deletions
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); |