From: Juergen Gross <jgross@suse.com>
To: xen-devel@lists.xen.org
Cc: Juergen Gross <jgross@suse.com>,
sstabellini@kernel.org, wei.liu2@citrix.com,
George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com
Subject: [PATCH] xen: fix boolean parameter handling
Date: Mon, 28 Aug 2017 16:49:30 +0200 [thread overview]
Message-ID: <20170828144930.24539-1-jgross@suse.com> (raw)
Commit 63e8a1e5ffa7a7fdbde887805f673fea7e8d2e94 ("xen: check parameter
validity when parsing command line") introduced a bug for the case
when a boolean parameter was specified by its keyword only (no value).
It would set just the wrong boolean value for that parameter.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
xen/common/kernel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index f96e402515..94fdf5c60a 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -136,7 +136,7 @@ static int parse_params(const char *cmdline, const struct kernel_param *start,
rctmp = -EINVAL;
break;
case OPT_BOOL:
- rctmp = *optval ? parse_bool(optval, NULL) : 0;
+ rctmp = *optval ? parse_bool(optval, NULL) : 1;
if ( rctmp < 0 )
break;
if ( !rctmp )
--
2.12.3
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2017-08-28 14:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-28 14:49 Juergen Gross [this message]
2017-08-28 15:02 ` [PATCH] xen: fix boolean parameter handling Jan Beulich
2017-08-28 15:45 ` Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170828144930.24539-1-jgross@suse.com \
--to=jgross@suse.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=sstabellini@kernel.org \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.