]> xenbits.xensource.com Git - xen.git/commitdiff
xen/common/domain.c: let custom parameter parsing routines return errno
authorJuergen Gross <jgross@suse.com>
Wed, 23 Aug 2017 17:34:00 +0000 (19:34 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 25 Aug 2017 14:18:01 +0000 (16:18 +0200)
Modify the custom parameter parsing routines in:

xen/common/domain.c

to indicate whether the parameter value was parsed successfully.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/domain.c

index b22aacc57e3a860c61f496b4f9e54d30150fb11f..acd420a1a536d783238c915efce10294d5172507 100644 (file)
@@ -245,12 +245,15 @@ static int late_hwdom_init(struct domain *d)
 
 static unsigned int __read_mostly extra_hwdom_irqs;
 static unsigned int __read_mostly extra_domU_irqs = 32;
-static void __init parse_extra_guest_irqs(const char *s)
+
+static int __init parse_extra_guest_irqs(const char *s)
 {
     if ( isdigit(*s) )
         extra_domU_irqs = simple_strtoul(s, &s, 0);
     if ( *s == ',' && isdigit(*++s) )
         extra_hwdom_irqs = simple_strtoul(s, &s, 0);
+
+    return *s ? -EINVAL : 0;
 }
 custom_param("extra_guest_irqs", parse_extra_guest_irqs);