summaryrefslogtreecommitdiff
path: root/src/user/app/shell/shell.c
diff options
context:
space:
mode:
authordzwdz2023-01-06 20:45:30 +0100
committerdzwdz2023-01-06 20:45:30 +0100
commite0c7bad47a54d865ef6194643e2cd20f6094e507 (patch)
treea9c731aecaad9c08ff4e732ae5dc8941a60cddd4 /src/user/app/shell/shell.c
parentaedefd551da5e50f89eeaf74a7d6e1a76760ec7b (diff)
kernel: turn the NULLFS into an always present special handle
preparing for HANDLE_PROCFS
Diffstat (limited to 'src/user/app/shell/shell.c')
-rw-r--r--src/user/app/shell/shell.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/user/app/shell/shell.c b/src/user/app/shell/shell.c
index 909d625..8aa640b 100644
--- a/src/user/app/shell/shell.c
+++ b/src/user/app/shell/shell.c
@@ -46,6 +46,13 @@ void run_args(int argc, char **argv, struct redir *redir) {
exit(1);
}
return;
+ } else if (!strcmp(argv[0], "shadow")) {
+ if (argc < 2) {
+ fprintf(stderr, "shadow: missing path\n");
+ } else {
+ _syscall_mount(HANDLE_NULLFS, argv[1], strlen(argv[1]));
+ }
+ return;
} else if (!strcmp(argv[0], "cd")) {
if (chdir(argc > 1 ? argv[1] : "/") < 0)
perror("cd");