console: better handing of console_timestamps as a boolean_param
authorDon Slutz <dslutz@verizon.com>
Mon, 4 Aug 2014 11:45:08 +0000 (13:45 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 4 Aug 2014 11:45:08 +0000 (13:45 +0200)
In order to handle all the old ways, change to use parse_bool().

Signed-off-by: Don Slutz <dslutz@verizon.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Restructure code to limit churn.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/drivers/char/console.c

index 2f6c0907e73551ff7be696d99f672fece5c7755f..2f03259610a9e59304aa7969b4e864adac404cbf 100644 (file)
@@ -559,6 +559,15 @@ static int printk_prefix_check(char *p, char **pp)
 
 static void __init parse_console_timestamps(char *s)
 {
+    switch ( parse_bool(s) )
+    {
+    case 0:
+        opt_con_timestamp_mode = TSM_NONE;
+        return;
+    case 1:
+        opt_con_timestamp_mode = TSM_DATE;
+        return;
+    }
     if ( *s == '\0' || /* Compat for old booleanparam() */
          !strcmp(s, "date") )
         opt_con_timestamp_mode = TSM_DATE;