Modify the custom parameter parsing routines in:
xen/drivers/passthrough/vtd/quirks.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: Kevin Tian <kevin.tian@intel.com>
}
}
-static void __init parse_snb_timeout(const char *s)
+static int __init parse_snb_timeout(const char *s)
{
int t;
+ const char *q = NULL;
t = parse_bool(s, NULL);
if ( t < 0 )
else if ( strcmp(s, "cap") == 0 )
t = SNB_IGD_TIMEOUT;
else
- t = strtoul(s, NULL, 0);
+ t = strtoul(s, &q, 0);
}
else
t = t ? SNB_IGD_TIMEOUT_LEGACY : 0;
snb_igd_timeout = MILLISECS(t);
- return;
+ return (q && *q) ? -EINVAL : 0;
}
custom_param("snb_igd_quirk", parse_snb_timeout);