From: Don Slutz <dslutz@verizon.com>
To: Jan Beulich <JBeulich@suse.com>, Don Slutz <dslutz@verizon.com>
Cc: Keir Fraser <keir@xen.org>,
Ian Campbell <ian.campbell@citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Tim Deegan <tim@xen.org>,
xen-devel@lists.xen.org, Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: [PATCH v2 2/2] xen/console: Better handing of console_timestamps as a boolean_param
Date: Wed, 30 Jul 2014 20:36:32 -0400 [thread overview]
Message-ID: <53D98F90.1030305@terremark.com> (raw)
In-Reply-To: <53D8C3A502000078000278A7@mail.emea.novell.com>
On 07/30/14 04:06, Jan Beulich wrote:
>>>> On 30.07.14 at 10:01, <JBeulich@suse.com> wrote:
>>>>> On 29.07.14 at 21:57, <dslutz@verizon.com> wrote:
>>> --- a/xen/drivers/char/console.c
>>> +++ b/xen/drivers/char/console.c
>> The patch could have been quite a bit smaller if you used "return"
>> instead of "break" in the two above cases.
> I.e.
>
> 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 <dslutz@verizon.com>
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>
> Restructure code to limit churn.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
This is fine with me.
-Don Slutz
> --- a/xen/drivers/char/console.c
> +++ b/xen/drivers/char/console.c
> @@ -559,6 +559,15 @@ static int printk_prefix_check(char *p,
>
> 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;
>
>
>
next prev parent reply other threads:[~2014-07-31 0:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-29 19:57 [PATCH v2 0/2] parse_bool fixes Don Slutz
2014-07-29 19:57 ` [PATCH v2 1/2] cmdline_parse: Convert no- prefix into =no for OPT_CUSTOM Don Slutz
2014-07-30 7:58 ` Jan Beulich
2014-07-31 0:59 ` Don Slutz
2014-08-01 6:57 ` Jan Beulich
2014-08-01 12:36 ` Don Slutz
2014-08-04 10:58 ` Ian Campbell
2014-08-04 11:39 ` Jan Beulich
2014-07-29 19:57 ` [PATCH v2 2/2] xen/console: Better handing of console_timestamps as a boolean_param Don Slutz
2014-07-30 8:01 ` Jan Beulich
2014-07-30 8:06 ` Jan Beulich
2014-07-31 0:36 ` Don Slutz [this message]
2014-08-04 11:00 ` Ian Campbell
2014-07-29 20:10 ` [PATCH v2 0/2] parse_bool fixes Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53D98F90.1030305@terremark.com \
--to=dslutz@verizon.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).