From 20e3f127a9c79f8ed9a9fcc3ffea0172eda4d606 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 13 Aug 2022 22:07:15 +0200 Subject: user: a primitive login utility --- src/user/app/init/init.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/user/app/init') diff --git a/src/user/app/init/init.c b/src/user/app/init/init.c index d9dabc6..49cc085 100644 --- a/src/user/app/init/init.c +++ b/src/user/app/init/init.c @@ -47,6 +47,18 @@ int main(void) { NULL }); } + MOUNT_AT("/Users/") { + MOUNT_AT("/tmp/") { + const char *argv[] = {"/bin/tmpfs", NULL}; + execv(argv[0], (void*)argv); + } + // TODO a simple union isn't enough here + fs_union((const char*[]){ + "/tmp/", + "/init/Users/", + NULL + }); + } MOUNT_AT("/tmp/") { const char *argv[] = {"/bin/tmpfs", NULL}; execv(argv[0], (void*)argv); @@ -55,10 +67,6 @@ int main(void) { const char *argv[] = {"/bin/vterm", NULL}; execv(argv[0], (void*)argv); } - MOUNT_AT("/union/") { - const char *list[] = {"/tmp/", "/init/", NULL}; - fs_union(list); - } if (_syscall_pipe(killswitch_pipe, 0) < 0) { printf("couldn't create the killswitch pipe, quitting...\n"); -- cgit v1.2.3