From fbca0c5aed51e46e82741d3ed7d8325361631f94 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 13 Oct 2021 21:47:47 +0200 Subject: init/shell: implement the `exit` command --- src/init/shell.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/init/shell.c b/src/init/shell.c index 6002156..6b195cc 100644 --- a/src/init/shell.c +++ b/src/init/shell.c @@ -70,6 +70,8 @@ void shell_loop(void) { printf("%s\n", args); } else if (!strcmp(cmd, "cat")) { cmd_cat(args); + } else if (!strcmp(cmd, "exit")) { + _syscall_exit(0); } else { printf("unknown command :(\n"); } -- cgit v1.2.3