>>> 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
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
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)
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
>>> 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) ||
> -
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
> 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
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