aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/stdio_console.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/stdio_console.c')
-rw-r--r--arch/um/drivers/stdio_console.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c
index 9b2dd0b8a4..3cbfe3a886 100644
--- a/arch/um/drivers/stdio_console.c
+++ b/arch/um/drivers/stdio_console.c
@@ -52,9 +52,9 @@ static struct chan_opts opts = {
52 .in_kernel = 1, 52 .in_kernel = 1,
53}; 53};
54 54
55static int con_config(char *str); 55static int con_config(char *str, char **error_out);
56static int con_get_config(char *dev, char *str, int size, char **error_out); 56static int con_get_config(char *dev, char *str, int size, char **error_out);
57static int con_remove(int n); 57static int con_remove(int n, char **con_remove);
58 58
59static struct line_driver driver = { 59static struct line_driver driver = {
60 .name = "UML console", 60 .name = "UML console",
@@ -87,9 +87,9 @@ static struct line vts[MAX_TTYS] = { LINE_INIT(CONFIG_CON_ZERO_CHAN, &driver),
87 [ 1 ... MAX_TTYS - 1 ] = 87 [ 1 ... MAX_TTYS - 1 ] =
88 LINE_INIT(CONFIG_CON_CHAN, &driver) }; 88 LINE_INIT(CONFIG_CON_CHAN, &driver) };
89 89
90static int con_config(char *str) 90static int con_config(char *str, char **error_out)
91{ 91{
92 return line_config(vts, ARRAY_SIZE(vts), str, &opts); 92 return line_config(vts, ARRAY_SIZE(vts), str, &opts, error_out);
93} 93}
94 94
95static int con_get_config(char *dev, char *str, int size, char **error_out) 95static int con_get_config(char *dev, char *str, int size, char **error_out)
@@ -97,9 +97,9 @@ static int con_get_config(char *dev, char *str, int size, char **error_out)
97 return line_get_config(dev, vts, ARRAY_SIZE(vts), str, size, error_out); 97 return line_get_config(dev, vts, ARRAY_SIZE(vts), str, size, error_out);
98} 98}
99 99
100static int con_remove(int n) 100static int con_remove(int n, char **error_out)
101{ 101{
102 return line_remove(vts, ARRAY_SIZE(vts), n); 102 return line_remove(vts, ARRAY_SIZE(vts), n, error_out);
103} 103}
104 104
105static int con_open(struct tty_struct *tty, struct file *filp) 105static int con_open(struct tty_struct *tty, struct file *filp)
@@ -192,7 +192,15 @@ __uml_exitcall(console_exit);
192 192
193static int console_chan_setup(char *str) 193static int console_chan_setup(char *str)
194{ 194{
195 return line_setup(vts, ARRAY_SIZE(vts), str); 195 char *error;
196 int ret;
197
198 ret = line_setup(vts, ARRAY_SIZE(vts), str, &error);
199 if(ret < 0)
200 printk(KERN_ERR "Failed to set up console with "
201 "configuration string \"%s\" : %s\n", str, error);
202
203 return 1;
196} 204}
197__setup("con", console_chan_setup); 205__setup("con", console_chan_setup);
198__channel_help(console_chan_setup, "con"); 206__channel_help(console_chan_setup, "con");