Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Make panic= and panic_on_oops into core_params

This allows them to be examined and set after boot, plus means they
actually give errors if they are misused (eg. panic=yes).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

+3 -14
+3 -14
kernel/panic.c
··· 34 34 35 35 EXPORT_SYMBOL(panic_notifier_list); 36 36 37 - static int __init panic_setup(char *str) 38 - { 39 - panic_timeout = simple_strtoul(str, NULL, 0); 40 - return 1; 41 - } 42 - __setup("panic=", panic_setup); 43 - 44 37 static long no_blink(long time) 45 38 { 46 39 return 0; ··· 211 218 } 212 219 EXPORT_SYMBOL(add_taint); 213 220 214 - static int __init pause_on_oops_setup(char *str) 215 - { 216 - pause_on_oops = simple_strtoul(str, NULL, 0); 217 - return 1; 218 - } 219 - __setup("pause_on_oops=", pause_on_oops_setup); 220 - 221 221 static void spin_msec(int msecs) 222 222 { 223 223 int i; ··· 370 384 } 371 385 EXPORT_SYMBOL(__stack_chk_fail); 372 386 #endif 387 + 388 + core_param(panic, panic_timeout, int, 0644); 389 + core_param(pause_on_oops, pause_on_oops, int, 0644);