diff options
author | dzwdz | 2023-08-04 01:20:38 +0200 |
---|---|---|
committer | dzwdz | 2023-08-06 00:36:07 +0200 |
commit | a71120adf590f699c4b8d6249a340976575ea530 (patch) | |
tree | fa099b8552c1536e29f1a1a9ec2bb04663b8370b /src/user/app | |
parent | 2d7da42acbf2782636e481ebd79f30700fb7dc9e (diff) |
libc: fs_dirinject2 for injecting multiple paths
Diffstat (limited to 'src/user/app')
-rw-r--r-- | src/user/app/init/init.c | 9 | ||||
-rw-r--r-- | src/user/app/shell/shell.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/user/app/init/init.c b/src/user/app/init/init.c index 9528a28..61fb27b 100644 --- a/src/user/app/init/init.c +++ b/src/user/app/init/init.c @@ -43,6 +43,15 @@ int main(void) { freopen("/kdev/com1", "a+", stderr); printf("[init] stage 2, main at %p, teststr at %p\n", &main, teststr); + MOUNT_AT("/") { + fs_dirinject2((const char*[]){ + "/fake/b/c", + "/fake/c", + "/faker", + NULL + }); + } + MOUNT_AT("/keyboard") { MOUNT_AT("/") { fs_whitelist((const char*[]){"/kdev/ps2/kb", NULL}); } ps2_drv(); diff --git a/src/user/app/shell/shell.c b/src/user/app/shell/shell.c index 8e13029..e9293bc 100644 --- a/src/user/app/shell/shell.c +++ b/src/user/app/shell/shell.c @@ -61,7 +61,7 @@ void run_args(int argc, char **argv, struct redir *redir) { /* if (!(3 <= argc && !strcmp(argv[2], "raw"))) { if (!fork2_n_mount("/")) { - fs_dir_inject(argv[1]); + fs_dirinject(argv[1]); exit(1); } } |