From: Ben Pfaff Date: Wed, 24 May 2006 20:18:05 +0000 (+0000) Subject: Enclose kernel command line arguments that contain spaces in quotes X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=926e47d289d06a6bc9ae03029199cf736a78911e;p=pintos-anon Enclose kernel command line arguments that contain spaces in quotes when printing. --- diff --git a/src/threads/init.c b/src/threads/init.c index a624ef5..8af05ec 100644 --- a/src/threads/init.c +++ b/src/threads/init.c @@ -219,7 +219,10 @@ read_command_line (void) /* Print kernel command line. */ printf ("Kernel command line:"); for (i = 0; i < argc; i++) - printf (" %s", argv[i]); + if (strchr (argv[i], ' ') == NULL) + printf (" %s", argv[i]); + else + printf (" '%s'", argv[i]); printf ("\n"); return argv;