Enclose kernel command line arguments that contain spaces in quotes
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 24 May 2006 20:18:05 +0000 (20:18 +0000)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 24 May 2006 20:18:05 +0000 (20:18 +0000)
when printing.

src/threads/init.c

index a624ef57edf02a2b3aa7b392e5a4fc37abded034..8af05ece005e629237e3cd459560369e4cab4ca7 100644 (file)
@@ -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;