[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] xen: fix boolean parameter handling
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@xxxxxxxx> --- 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@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |