xen: fix boolean parameter handling
PATCH 1/1 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.
--- xen/common/kernel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/kernel.c +1 -1
@@ -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 )
Signature · 7 lines
2.12.3 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 28.08.17 at 16:49, <[email protected]> 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 <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 10 lines · Jan Beulich
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 28.08.17 at 16:49, <[email protected]> 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 <[email protected]>Acked-by Jan Beulich <[email protected]>
Reviewed, tested and queued. Thanks.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel