* [PATCH] xen: fix boolean parameter handling
@ 2017-08-28 14:49 Juergen Gross
2017-08-28 15:02 ` Jan Beulich
0 siblings, 1 reply; 3+ messages in thread
From: Juergen Gross @ 2017-08-28 14:49 UTC (permalink / raw)
To: xen-devel
Cc: Juergen Gross, sstabellini, wei.liu2, George.Dunlap,
andrew.cooper3, ian.jackson, tim, jbeulich
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xen: fix boolean parameter handling
2017-08-28 14:49 [PATCH] xen: fix boolean parameter handling Juergen Gross
@ 2017-08-28 15:02 ` Jan Beulich
2017-08-28 15:45 ` Andrew Cooper
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2017-08-28 15:02 UTC (permalink / raw)
To: Juergen Gross
Cc: tim, sstabellini, wei.liu2, George.Dunlap, andrew.cooper3,
ian.jackson, xen-devel
>>> On 28.08.17 at 16:49, <jgross@suse.com> wrote:
> 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>
Acked-by: Jan Beulich <jbeulich@suse.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xen: fix boolean parameter handling
2017-08-28 15:02 ` Jan Beulich
@ 2017-08-28 15:45 ` Andrew Cooper
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2017-08-28 15:45 UTC (permalink / raw)
To: Jan Beulich, Juergen Gross
Cc: sstabellini, wei.liu2, George.Dunlap, tim, ian.jackson, xen-devel
On 28/08/17 16:02, Jan Beulich wrote:
>>>> On 28.08.17 at 16:49, <jgross@suse.com> wrote:
>> 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>
> Acked-by: Jan Beulich <jbeulich@suse.com>
>
>
Reviewed, tested and queued. Thanks.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-28 15:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-28 14:49 [PATCH] xen: fix boolean parameter handling Juergen Gross
2017-08-28 15:02 ` Jan Beulich
2017-08-28 15:45 ` Andrew Cooper
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.