From 7aa79f948749da7de3de0c427e9c9ee0ff595243 Mon Sep 17 00:00:00 2001 From: Martin Schwidefsky Date: Fri, 12 Jun 2009 10:26:20 +0200 Subject: [S390] vdso: kernel parameter syntax The syntax of the vdso kernel parameter is documented as vdso=[on|off]. The implementation uses vdso=[0|1], an invalid parameter string disables the vdso support. Fix the mismatch by adding vdso=[on|off] as additional parameter syntax. Signed-off-by: Martin Schwidefsky --- arch/s390/kernel/vdso.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c index 89b2e7f1b7a9..7b76ee4fb16c 100644 --- a/arch/s390/kernel/vdso.c +++ b/arch/s390/kernel/vdso.c @@ -53,8 +53,19 @@ unsigned int __read_mostly vdso_enabled = 1; static int __init vdso_setup(char *s) { - vdso_enabled = simple_strtoul(s, NULL, 0); - return 1; + unsigned long val; + int rc; + + rc = 0; + if (strncmp(s, "on", 3) == 0) + vdso_enabled = 1; + else if (strncmp(s, "off", 4) == 0) + vdso_enabled = 0; + else { + rc = strict_strtoul(s, 0, &val); + vdso_enabled = rc ? 0 : !!val; + } + return !rc; } __setup("vdso=", vdso_setup); -- cgit v1.2.2