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

[Xen-changelog] [xen master] convert "no-" command line option prefix into "=no" for OPT_CUSTOM



commit a0d52bfab4cb90e0f49073f12730936c1f3e718d
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Aug 4 13:44:36 2014 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Aug 4 13:44:36 2014 +0200

    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-<name>=<value>" will now be ignored as ambiguous (rather
    than being interpreted as "<name>=<value>", i.e. ignoring the "no-"
    prefix).
    
    Reported-by: Don Slutz <dslutz@xxxxxxxxxxx>
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 xen/common/kernel.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index 7e83353..d23c422 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:
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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