From a0d52bfab4cb90e0f49073f12730936c1f3e718d Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 4 Aug 2014 13:44:36 +0200 Subject: [PATCH] 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 --- xen/common/kernel.c | 7 +++++++ 1 file changed, 7 insertions(+) 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: -- 2.30.2