From: Don Slutz Date: Mon, 4 Aug 2014 11:45:08 +0000 (+0200) Subject: console: better handing of console_timestamps as a boolean_param X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4561 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4efef44f0adacc9857b3a5035414db7ef281c8bf;p=xen.git console: better handing of console_timestamps as a boolean_param In order to handle all the old ways, change to use parse_bool(). Signed-off-by: Don Slutz Reviewed-by: Andrew Cooper Restructure code to limit churn. Signed-off-by: Jan Beulich Acked-by: Ian Campbell --- diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 2f6c0907e7..2f03259610 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -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;