[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 27/52] xen/common/memory.c: let custom parameter parsing routines return errno
Modify the custom parameter parsing routines in: xen/common/memory.c to indicate whether the parameter value was parsed successfully. Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Jan Beulich <jbeulich@xxxxxxxx> Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Tim Deegan <tim@xxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> Signed-off-by: Juergen Gross <jgross@xxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- V3: - cosmetic changes (Jan Beulich) --- xen/common/memory.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/common/memory.c b/xen/common/memory.c index b2066db07e..26da6050f6 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -55,7 +55,8 @@ static unsigned int __read_mostly hwdom_max_order = CONFIG_HWDOM_MAX_ORDER; #ifdef HAS_PASSTHROUGH static unsigned int __read_mostly ptdom_max_order = CONFIG_PTDOM_MAX_ORDER; #endif -static void __init parse_max_order(const char *s) + +static int __init parse_max_order(const char *s) { if ( *s != ',' ) domu_max_order = simple_strtoul(s, &s, 0); @@ -67,6 +68,8 @@ static void __init parse_max_order(const char *s) if ( *s == ',' && *++s != ',' ) ptdom_max_order = simple_strtoul(s, &s, 0); #endif + + return *s ? -EINVAL : 0; } custom_param("memop-max-order", parse_max_order); -- 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 |