[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 29/52] xen/drivers/acpi/tables.c: let custom parameter parsing routines return errno
Modify the custom parameter parsing routines in: xen/drivers/acpi/tables.c to indicate whether the parameter value was parsed successfully. Cc: Jan Beulich <jbeulich@xxxxxxxx> Signed-off-by: Juergen Gross <jgross@xxxxxxxx> --- xen/drivers/acpi/tables.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/drivers/acpi/tables.c b/xen/drivers/acpi/tables.c index dd2031f36a..ea600248aa 100644 --- a/xen/drivers/acpi/tables.c +++ b/xen/drivers/acpi/tables.c @@ -458,12 +458,13 @@ int __init acpi_table_init(void) static int __init acpi_parse_apic_instance(char *str) { + const char *q; - acpi_apic_instance = simple_strtoul(str, NULL, 0); + acpi_apic_instance = simple_strtoul(str, &q, 0); printk(KERN_NOTICE PREFIX "Shall use APIC/MADT table %d\n", acpi_apic_instance); - return 0; + return *q ? -EINVAL : 0; } custom_param("acpi_apic_instance", acpi_parse_apic_instance); -- 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 |