Re: [Xen-devel] [PATCH v4 01/53] xen: add an optional string end parameter to parse_bool()

2017-08-25 Thread Jan Beulich
>>> On 25.08.17 at 10:31, wrote: > On 24/08/17 17:43, Andrew Cooper wrote: >> I had planned to modify parse_bool() to be >> >> int parse_bool(const char *field, const char *s) >> { >> ... >> } >> >> which cases care of considering the "no-" prefix, optionally skips the >> field name if it ma

Re: [Xen-devel] [PATCH v4 01/53] xen: add an optional string end parameter to parse_bool()

2017-08-25 Thread Juergen Gross
On 24/08/17 17:43, Andrew Cooper wrote: > On 23/08/17 18:33, Juergen Gross wrote: >> Add a parameter to parse_bool() to specify the end of the to be >> parsed string. Specifying it as NULL will preserve the current >> behavior to parse until the end of the input string, while passing >> a non-NULL

Re: [Xen-devel] [PATCH v4 01/53] xen: add an optional string end parameter to parse_bool()

2017-08-24 Thread Juergen Gross
On 24/08/17 17:33, Jan Beulich wrote: On 23.08.17 at 19:33, wrote: >> @@ -163,20 +163,24 @@ void __init cmdline_parse(const char *cmdline) >> #endif >> } >> >> -int __init parse_bool(const char *s) >> +int __init parse_bool(const char *s, const char *e) >> { >> -if ( !strcmp("no", s)

Re: [Xen-devel] [PATCH v4 01/53] xen: add an optional string end parameter to parse_bool()

2017-08-24 Thread Andrew Cooper
On 23/08/17 18:33, Juergen Gross wrote: > Add a parameter to parse_bool() to specify the end of the to be > parsed string. Specifying it as NULL will preserve the current > behavior to parse until the end of the input string, while passing > a non-NULL pointer will specify the first character after

Re: [Xen-devel] [PATCH v4 01/53] xen: add an optional string end parameter to parse_bool()

2017-08-24 Thread Jan Beulich
>>> On 23.08.17 at 19:33, wrote: > @@ -163,20 +163,24 @@ void __init cmdline_parse(const char *cmdline) > #endif > } > > -int __init parse_bool(const char *s) > +int __init parse_bool(const char *s, const char *e) > { > -if ( !strcmp("no", s) || > - !strcmp("off", s) || > -

Re: [Xen-devel] [PATCH v4 01/53] xen: add an optional string end parameter to parse_bool()

2017-08-24 Thread Wei Liu
On Wed, Aug 23, 2017 at 07:33:54PM +0200, Juergen Gross wrote: > Add a parameter to parse_bool() to specify the end of the to be > parsed string. Specifying it as NULL will preserve the current > behavior to parse until the end of the input string, while passing > a non-NULL pointer will specify th

Re: [Xen-devel] [PATCH v4 01/53] xen: add an optional string end parameter to parse_bool()

2017-08-23 Thread Tian, Kevin
> From: Juergen Gross [mailto:jgr...@suse.com] > Sent: Thursday, August 24, 2017 1:34 AM > > Add a parameter to parse_bool() to specify the end of the to be > parsed string. Specifying it as NULL will preserve the current > behavior to parse until the end of the input string, while passing > a non

[Xen-devel] [PATCH v4 01/53] xen: add an optional string end parameter to parse_bool()

2017-08-23 Thread Juergen Gross
Add a parameter to parse_bool() to specify the end of the to be parsed string. Specifying it as NULL will preserve the current behavior to parse until the end of the input string, while passing a non-NULL pointer will specify the first character after the input string. This will allow to parse boo