[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] x86/Dom0: minor command line parsing adjustments
commit f7448aea0e425a8b092191ea1741e3669e012a8c Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Thu Feb 26 14:00:21 2015 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Feb 26 14:00:21 2015 +0100 x86/Dom0: minor command line parsing adjustments Remove a redundant statement from parse_dom0_mem() and refuse bogus ranges (with a separator other than a dash) passed to parse_dom0_max_vcpus(). Fix coding style issues in the latter function at the same time. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> --- xen/arch/x86/domain_build.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/domain_build.c b/xen/arch/x86/domain_build.c index 4380b57..9b93653 100644 --- a/xen/arch/x86/domain_build.c +++ b/xen/arch/x86/domain_build.c @@ -78,8 +78,6 @@ static void __init parse_dom0_mem(const char *s) dom0_max_nrpages = parse_amt(s+4, &s); else dom0_nrpages = parse_amt(s, &s); - if ( *s != ',' ) - break; } while ( *s++ == ',' ); } custom_param("dom0_mem", parse_dom0_mem); @@ -89,14 +87,14 @@ static unsigned int __initdata opt_dom0_max_vcpus_max = UINT_MAX; static void __init parse_dom0_max_vcpus(const char *s) { - if (*s == '-') /* -M */ + if ( *s == '-' ) /* -M */ opt_dom0_max_vcpus_max = simple_strtoul(s + 1, &s, 0); - else /* N, N-, or N-M */ + else /* N, N-, or N-M */ { opt_dom0_max_vcpus_min = simple_strtoul(s, &s, 0); - if (*s++ == '\0') /* N */ + if ( !*s ) /* N */ opt_dom0_max_vcpus_max = opt_dom0_max_vcpus_min; - else if (*s != '\0') /* N-M */ + else if ( *s++ == '-' && *s ) /* N-M */ opt_dom0_max_vcpus_max = simple_strtoul(s, &s, 0); } } -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |