From 5481848e27fdd4fc859def9841a0283665531a46 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 13 Sep 2020 17:12:29 -0400 Subject: fixed some paging bugs, added fault handlers and new programs --- src/user/init/init.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/user/init/init.c') diff --git a/src/user/init/init.c b/src/user/init/init.c index 64c534e..390b731 100644 --- a/src/user/init/init.c +++ b/src/user/init/init.c @@ -3,25 +3,28 @@ #include void start(const char *cmd) { + tell_user_sz("[init] Starting "); tell_user_sz(cmd); tell_user_sz(": "); tell_user_sz( try_run_command(cmd) - ? "success\n" - : "failed\n" + ? "Succeded.\n" + : "Failed.\n" ); + tell_user_sz("[init] Yielding.\n"); + yield_task(); } -#define STARTUP_FILE_PATH "SYS/STARTUP.RC" +#define STARTUP_FILE_PATH "sys/startup.rc" void main() { struct file *f = open_file(STARTUP_FILE_PATH); if (!f) { - tell_user_sz("Could not open " STARTUP_FILE_PATH "\n"); + tell_user_sz("Could not open " STARTUP_FILE_PATH ".\n"); return; } - tell_user_sz("[init] Reading from " STARTUP_FILE_PATH ":\n"); + tell_user_sz("[init] Reading from " STARTUP_FILE_PATH ".\n"); char buf[1024]; char *bufp = buf; @@ -43,5 +46,5 @@ void main() { close_file(f); - tell_user_sz("[init] Done.\n"); + tell_user_sz("[init] Done starting programs.\n"); } -- cgit v1.2.3