From: Ben Pfaff Date: Thu, 16 Sep 2004 00:50:42 +0000 (+0000) Subject: Add -u to usage message. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=commitdiff_plain;h=5539377e713d0b7424a15547ca0242518e86ea9b Add -u to usage message. Make usage power off. Print kernel command line at start up. --- diff --git a/src/threads/init.c b/src/threads/init.c index 203b79d..49b26a9 100644 --- a/src/threads/init.c +++ b/src/threads/init.c @@ -152,14 +152,17 @@ argv_init (void) /* The command line is made up of null terminated strings followed by an empty string. Break it up into words. */ cmd_line = pos = ptov (LOADER_CMD_LINE); + printf ("Kernel command line:"); while (pos < cmd_line + LOADER_CMD_LINE_LEN) { ASSERT (argc < LOADER_CMD_LINE_LEN / 2); if (*pos == '\0') break; argv[argc++] = pos; + printf (" %s", pos); pos = strchr (pos, '\0') + 1; } + printf ("\n"); argv[argc] = ""; argv[argc + 1] = ""; @@ -215,10 +218,12 @@ argv_init (void) " -D Dump complete filesystem contents\n" #endif " -q Power off after doing requested actions.\n" + " -u Print this help message and power off.\n" ); + do_power_off (); } else - PANIC ("unknown option `%s'", argv[i]); + PANIC ("unknown option `%s' (use -u for help)", argv[i]); } void