diff --git a/user/banner.h b/user/banner.h deleted file mode 100644 index 8ac028c..0000000 --- a/user/banner.h +++ /dev/null @@ -1,25 +0,0 @@ -unsigned char banner[] = { - 0x0a, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x97, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, - 0x88, 0xe2, 0x95, 0x97, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x97, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88, - 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x97, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, - 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x97, 0x0a, 0x20, 0x20, 0xe2, 0x95, 0x9a, 0xe2, 0x96, 0x88, 0xe2, - 0x96, 0x88, 0xe2, 0x95, 0x97, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x94, 0xe2, 0x95, 0x9d, 0xe2, 0x96, - 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x91, 0x20, 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x91, - 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x94, 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x90, 0xe2, - 0x95, 0x90, 0xe2, 0x95, 0x9d, 0x0a, 0x20, 0x20, 0x20, 0xe2, 0x95, 0x9a, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, - 0x96, 0x88, 0xe2, 0x95, 0x94, 0xe2, 0x95, 0x9d, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x91, 0x20, - 0x20, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x91, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, - 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x97, 0x0a, 0x20, 0x20, - 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x94, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x97, - 0x20, 0xe2, 0x95, 0x9a, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x97, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, - 0x88, 0xe2, 0x95, 0x94, 0xe2, 0x95, 0x9d, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x94, 0xe2, 0x95, 0x90, - 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x90, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x97, 0x0a, 0x20, 0x20, 0xe2, - 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x94, 0xe2, 0x95, 0x9d, 0x20, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, - 0x95, 0x97, 0x20, 0xe2, 0x95, 0x9a, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, - 0x95, 0x94, 0xe2, 0x95, 0x9d, 0x20, 0xe2, 0x95, 0x9a, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, - 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x96, 0x88, 0xe2, 0x95, 0x94, 0xe2, 0x95, 0x9d, 0x0a, 0x20, 0x20, 0xe2, 0x95, - 0x9a, 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x9d, 0x20, 0x20, 0xe2, 0x95, 0x9a, 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x9d, 0x20, - 0x20, 0xe2, 0x95, 0x9a, 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x9d, 0x20, 0x20, 0x20, - 0xe2, 0x95, 0x9a, 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x90, 0xe2, 0x95, 0x90, 0xe2, - 0x95, 0x9d, 0x0a, 0x0a, 0x00, -}; diff --git a/user/init.c b/user/init.c index 48635b5..d41844d 100644 --- a/user/init.c +++ b/user/init.c @@ -8,10 +8,21 @@ #include "kernel/file.h" #include "user/user.h" #include "kernel/fcntl.h" -#include "user/banner.h" char *argv[] = { "sh", 0 }; +// clang-format off +const char *banner = +"\n $$\\ $$\\ $$$$$$\\\n" +" $$ | $$ | $$ __$$\\ \n" +" \\$$\\ $$ |$$\\ $$\\ $$ / \\__|\n" +" \\$$$$ / \\$$\\ $$ |$$$$$$$\\ \n" +" $$ $$< \\$$\\$$ / $$ __$$\\ \n" +" $$ /\\$$\\ \\$$$ / $$ / $$ |\n" +" $$ / $$ | \\$ / $$$$$$ |\n" +" \\__| \\__| \\_/ \\______/\n\n"; +// clang-format on + int main(void) { @@ -26,8 +37,7 @@ main(void) for(;;) { printf("init: starting sh\n"); - // printf(banner); - printf((const char *)banner); + printf(banner); pid = fork(); if(pid < 0) { printf("init: fork failed\n"); @@ -44,9 +54,7 @@ main(void) // or if a parentless process exits. wpid = wait((int *)0); if(wpid == pid) { - // FIXME: Obviously not how things should be done - printf("\nShell exited... Halting\n"); - halt(); + // the shell exited; restart it. break; } else if(wpid < 0) { printf("init: wait returned an error\n");