[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 1/2] cmdline_parse: Convert no- prefix into =no for OPT_CUSTOM



>>> On 31.07.14 at 02:59, <dslutz@xxxxxxxxxxx> wrote:
> On 07/30/14 03:58, Jan Beulich wrote:
>> --- a/xen/common/kernel.c
>> +++ b/xen/common/kernel.c
>> @@ -135,6 +135,13 @@ void __init cmdline_parse(const char *cm
>>                       parse_size_and_unit(optval, NULL));
>>                   break;
>>               case OPT_CUSTOM:
>> +                if ( !bool_assert )
>> +                {
>> +                    if ( *optval )
>> +                        break;
>> +                    safe_strcpy(opt, "no");
>> +                    optval = opt;
>> +                }
>>                   ((void (*)(const char *))param->var)(optval);
>>                   break;
>>               default:
>>
>>
> 
> Without the log message, I think it might help to include the part about
> ignoring bogus "no-<name>=<value>"... aka stacked inversions in the
> commit message.  This is because boolean options do still support stacked
> inversions, which is valid under the statement "Explicitly specifying any
> value other than those listed above is undefined, as is stacking a `no-`
> prefix with an explicit value."

I added:

Obviously that'll work only when no
other argument was specified for the option. Command line settings of
the form "no-<name>=<value>" will now be ignored as ambiguous (rather
than being interpreted as "<name>=<value>", i.e. ignoring the "no-"
prefix).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.