From: Jan Beulich Date: Mon, 4 Aug 2014 11:44:36 +0000 (+0200) Subject: convert "no-" command line option prefix into "=no" for OPT_CUSTOM X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4562 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a0d52bfab4cb90e0f49073f12730936c1f3e718d;p=xen.git convert "no-" command line option prefix into "=no" for OPT_CUSTOM ... to allow restoring/retaining previous behavior for options getting converted from boolean to custom. Obviously that'll work only when no other argument was specified for the option. Command line settings of the form "no-=" will now be ignored as ambiguous (rather than being interpreted as "=", i.e. ignoring the "no-" prefix). Reported-by: Don Slutz Signed-off-by: Jan Beulich Acked-by: Ian Campbell --- diff --git a/xen/common/kernel.c b/xen/common/kernel.c index 7e83353a6e..d23c4229df 100644 --- a/xen/common/kernel.c +++ b/xen/common/kernel.c @@ -135,6 +135,13 @@ void __init cmdline_parse(const char *cmdline) 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: