diff options
author | Kees Cook <keescook@chromium.org> | 2016-03-17 17:23:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-03-17 18:09:34 -0400 |
commit | 4cc7ecb7f2a60e8deb783b8fbf7c1ae467acb920 (patch) | |
tree | cf735eccc32856c261d4ba4b54a58c9ff90a7b62 /arch/powerpc/kernel/rtasd.c | |
parent | a81a5a17d44b26521fb1199f8ccf27f4af337a67 (diff) |
param: convert some "on"/"off" users to strtobool
This changes several users of manual "on"/"off" parsing to use
strtobool.
Some side-effects:
- these uses will now parse y/n/1/0 meaningfully too
- the early_param uses will now bubble up parse errors
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
Cc: Amitkumar Karwar <akarwar@marvell.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Joe Perches <joe@perches.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Nishant Sarmukadam <nishants@marvell.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Steve French <sfrench@samba.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/powerpc/kernel/rtasd.c')
-rw-r--r-- | arch/powerpc/kernel/rtasd.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c index 5a2c049c1c61..aa610ce8742f 100644 --- a/arch/powerpc/kernel/rtasd.c +++ b/arch/powerpc/kernel/rtasd.c | |||
@@ -49,7 +49,7 @@ static unsigned int rtas_error_log_buffer_max; | |||
49 | static unsigned int event_scan; | 49 | static unsigned int event_scan; |
50 | static unsigned int rtas_event_scan_rate; | 50 | static unsigned int rtas_event_scan_rate; |
51 | 51 | ||
52 | static int full_rtas_msgs = 0; | 52 | static bool full_rtas_msgs; |
53 | 53 | ||
54 | /* Stop logging to nvram after first fatal error */ | 54 | /* Stop logging to nvram after first fatal error */ |
55 | static int logging_enabled; /* Until we initialize everything, | 55 | static int logging_enabled; /* Until we initialize everything, |
@@ -592,11 +592,6 @@ __setup("surveillance=", surveillance_setup); | |||
592 | 592 | ||
593 | static int __init rtasmsgs_setup(char *str) | 593 | static int __init rtasmsgs_setup(char *str) |
594 | { | 594 | { |
595 | if (strcmp(str, "on") == 0) | 595 | return (kstrtobool(str, &full_rtas_msgs) == 0); |
596 | full_rtas_msgs = 1; | ||
597 | else if (strcmp(str, "off") == 0) | ||
598 | full_rtas_msgs = 0; | ||
599 | |||
600 | return 1; | ||
601 | } | 596 | } |
602 | __setup("rtasmsgs=", rtasmsgs_setup); | 597 | __setup("rtasmsgs=", rtasmsgs_setup); |