aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index 7ce9a8c13312..f46cc6dff46e 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -726,6 +726,25 @@ int __init add_preferred_console(char *name, int idx, char *options)
726 return 0; 726 return 0;
727} 727}
728 728
729int __init update_console_cmdline(char *name, int idx, char *name_new, int idx_new, char *options)
730{
731 struct console_cmdline *c;
732 int i;
733
734 for (i = 0; i < MAX_CMDLINECONSOLES && console_cmdline[i].name[0]; i++)
735 if (strcmp(console_cmdline[i].name, name) == 0 &&
736 console_cmdline[i].index == idx) {
737 c = &console_cmdline[i];
738 memcpy(c->name, name_new, sizeof(c->name));
739 c->name[sizeof(c->name) - 1] = 0;
740 c->options = options;
741 c->index = idx_new;
742 return i;
743 }
744 /* not found */
745 return -1;
746}
747
729#ifndef CONFIG_DISABLE_CONSOLE_SUSPEND 748#ifndef CONFIG_DISABLE_CONSOLE_SUSPEND
730/** 749/**
731 * suspend_console - suspend the console subsystem 750 * suspend_console - suspend the console subsystem
@@ -942,6 +961,9 @@ void register_console(struct console *console)
942 if (preferred_console < 0 || bootconsole || !console_drivers) 961 if (preferred_console < 0 || bootconsole || !console_drivers)
943 preferred_console = selected_console; 962 preferred_console = selected_console;
944 963
964 if (console->early_setup)
965 console->early_setup();
966
945 /* 967 /*
946 * See if we want to use this console driver. If we 968 * See if we want to use this console driver. If we
947 * didn't select a console we take the first one 969 * didn't select a console we take the first one