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

xen/arch/arm/acpi/boot.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: Julien Grall <julien.grall@arm.com>
xen/arch/arm/acpi/boot.c

index a5a6f55f0e8c6c9291fd98e2703017d49876ace8..6101bf39c91db20b43f42dacc6217f307b0a3c0c 100644 (file)
@@ -193,16 +193,20 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table)
 static bool_t __initdata param_acpi_off;
 static bool_t __initdata param_acpi_force;
 
-static void __init parse_acpi_param(char *arg)
+static int __init parse_acpi_param(const char *arg)
 {
     if ( !arg )
-        return;
+        return -EINVAL;
 
     /* Interpret the parameter for use within Xen. */
     if ( !parse_bool(arg, NULL) )
         param_acpi_off = true;
     else if ( !strcmp(arg, "force") ) /* force ACPI to be enabled */
         param_acpi_force = true;
+    else
+        return -EINVAL;
+
+    return 0;
 }
 custom_param("acpi", parse_acpi_param);