From d4542c336a6cbfb43497055f19a85e7713f2eed7 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 25 Jun 2023 16:38:32 +0200 Subject: ports: reimplement the ports system from scratch side stuff: * removed sltar since it wasn't working anyways * made signal() no longer panic, as that broke certain ports (oops) * doom now ships with the FreeDOOM WADs * /usr/ was aliased to /init/usr/, more directories were added to /bin/ to improve compat with ports --- src/user/app/init/init.c | 7 +++++++ src/user/lib/signal.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/user/app/init/init.c b/src/user/app/init/init.c index b9219ec..9528a28 100644 --- a/src/user/app/init/init.c +++ b/src/user/app/init/init.c @@ -47,11 +47,18 @@ int main(void) { MOUNT_AT("/") { fs_whitelist((const char*[]){"/kdev/ps2/kb", NULL}); } ps2_drv(); } + MOUNT_AT("/usr/") { + fs_union((const char*[]){ + "/init/usr/", + NULL + }); + } MOUNT_AT("/bin/") { fs_union((const char*[]){ "/init/bin/amd64/", "/init/bin/sh/", "/init/usr/bin/", + "/init/usr/local/bin/", NULL }); } diff --git a/src/user/lib/signal.c b/src/user/lib/signal.c index 41340e7..3200263 100644 --- a/src/user/lib/signal.c +++ b/src/user/lib/signal.c @@ -86,7 +86,7 @@ int sigsuspend(const sigset_t *mask) { int signal(int sig, void (*func)(int)) { (void)sig; (void)func; - __libc_panic("unimplemented"); + return errno = ENOSYS, SIG_ERR; } int kill(pid_t pid, int sig) { -- cgit v1.2.3