xen/arch/x86/cpu/mcheck/mce.c: let custom parameter parsing routines return errno

Modify the custom parameter parsing routines in:

xen/arch/x86/cpu/mcheck/mce.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>
This commit is contained in:
Juergen Gross authored and Jan Beulich committed 2017-08-25 16:14:11 +02:00
1 parent 5ed76fbf66
commit 5bf030b2fd
1 file changed
+6 -1
+6 -1
View File
@@ -62,13 +62,18 @@ struct mca_banks *mca_allbanks;
#endif
int mce_verbosity;
static void __init mce_set_verbosity(char *str)
static int __init mce_set_verbosity(const char *str)
{
if (strcmp("verbose", str) == 0)
mce_verbosity = MCE_VERBOSE;
else
{
printk(KERN_DEBUG "Machine Check verbosity level %s not recognised"
"use mce_verbosity=verbose", str);
return -EINVAL;
}
return 0;
}
custom_param("mce_verbosity", mce_set_verbosity);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.