aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index 33284adb2189..2b591f252e55 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1316,6 +1316,18 @@ void console_start(struct console *console)
1316} 1316}
1317EXPORT_SYMBOL(console_start); 1317EXPORT_SYMBOL(console_start);
1318 1318
1319static int __read_mostly keep_bootcon;
1320
1321static int __init keep_bootcon_setup(char *str)
1322{
1323 keep_bootcon = 1;
1324 printk(KERN_INFO "debug: skip boot console de-registration.\n");
1325
1326 return 0;
1327}
1328
1329early_param("keep_bootcon", keep_bootcon_setup);
1330
1319/* 1331/*
1320 * The console driver calls this routine during kernel initialization 1332 * The console driver calls this routine during kernel initialization
1321 * to register the console printing procedure with printk() and to 1333 * to register the console printing procedure with printk() and to
@@ -1463,7 +1475,9 @@ void register_console(struct console *newcon)
1463 * users know there might be something in the kernel's log buffer that 1475 * users know there might be something in the kernel's log buffer that
1464 * went to the bootconsole (that they do not see on the real console) 1476 * went to the bootconsole (that they do not see on the real console)
1465 */ 1477 */
1466 if (bcon && ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV)) { 1478 if (bcon &&
1479 ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV) &&
1480 !keep_bootcon) {
1467 /* we need to iterate through twice, to make sure we print 1481 /* we need to iterate through twice, to make sure we print
1468 * everything out, before we unregister the console(s) 1482 * everything out, before we unregister the console(s)
1469 */ 1483 */