From fe2767219e22eda853cb1ad30c44c49afc1bed66 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 10 Aug 2023 00:07:35 +0200 Subject: user/fs: no longer inject MOUNT_ATs by default arguably the wrong choice from an usability standpoint, but the right choice from a performance standpoint. there's definitely a nicer way to do this --- src/user/app/init/init.c | 11 ++++++++--- src/user/app/shell/shell.c | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src/user/app') diff --git a/src/user/app/init/init.c b/src/user/app/init/init.c index 61fb27b..ca50699 100644 --- a/src/user/app/init/init.c +++ b/src/user/app/init/init.c @@ -45,9 +45,14 @@ int main(void) { MOUNT_AT("/") { fs_dirinject2((const char*[]){ - "/fake/b/c", - "/fake/c", - "/faker", + "/keyboard/", + "/usr/", + "/bin/", + "/Users/", + "/tmp/", + "/vtty", + "/net/", + "/initctl", NULL }); } diff --git a/src/user/app/shell/shell.c b/src/user/app/shell/shell.c index e9293bc..65f08b6 100644 --- a/src/user/app/shell/shell.c +++ b/src/user/app/shell/shell.c @@ -41,6 +41,9 @@ void run_args(int argc, char **argv, struct redir *redir) { fprintf(stderr, "mount: not enough arguments\n"); return; } + MOUNT_AT("/") { + fs_dirinject(argv[1]); + } MOUNT_AT(argv[1]) { run_args(argc - 2, argv + 2, redir); exit(1); -- cgit v1.2.3