Skip to content

Commit f44dd16

Browse files
committed
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>
1 parent d0ea3d7 commit f44dd16

1 file changed

Lines changed: 3 additions & 14 deletions

File tree

‎kernel/panic.c‎

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,6 @@ ATOMIC_NOTIFIER_HEAD(panic_notifier_list);
3434

3535
EXPORT_SYMBOL(panic_notifier_list);
3636

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-
4437
static long no_blink(long time)
4538
{
4639
return 0;
@@ -218,13 +211,6 @@ void add_taint(unsigned flag)
218211
}
219212
EXPORT_SYMBOL(add_taint);
220213

221-
static int __init pause_on_oops_setup(char *str)
222-
{
223-
pause_on_oops = simple_strtoul(str, NULL, 0);
224-
return 1;
225-
}
226-
__setup("pause_on_oops=", pause_on_oops_setup);
227-
228214
static void spin_msec(int msecs)
229215
{
230216
int i;
@@ -384,3 +370,6 @@ void __stack_chk_fail(void)
384370
}
385371
EXPORT_SYMBOL(__stack_chk_fail);
386372
#endif
373+
374+
core_param(panic, panic_timeout, int, 0644);
375+
core_param(pause_on_oops, pause_on_oops, int, 0644);

0 commit comments

Comments
 (0)