aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/ssl.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/ssl.c')
-rw-r--r--arch/um/drivers/ssl.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c
index ed9c59082d0d..1e82430b8444 100644
--- a/arch/um/drivers/ssl.c
+++ b/arch/um/drivers/ssl.c
@@ -46,9 +46,9 @@ static struct chan_opts opts = {
46 .in_kernel = 1, 46 .in_kernel = 1,
47}; 47};
48 48
49static int ssl_config(char *str); 49static int ssl_config(char *str, char **error_out);
50static int ssl_get_config(char *dev, char *str, int size, char **error_out); 50static int ssl_get_config(char *dev, char *str, int size, char **error_out);
51static int ssl_remove(int n); 51static int ssl_remove(int n, char **error_out);
52 52
53static struct line_driver driver = { 53static struct line_driver driver = {
54 .name = "UML serial line", 54 .name = "UML serial line",
@@ -80,9 +80,10 @@ static struct line serial_lines[NR_PORTS] =
80 80
81static struct lines lines = LINES_INIT(NR_PORTS); 81static struct lines lines = LINES_INIT(NR_PORTS);
82 82
83static int ssl_config(char *str) 83static int ssl_config(char *str, char **error_out)
84{ 84{
85 return line_config(serial_lines, ARRAY_SIZE(serial_lines), str, &opts); 85 return line_config(serial_lines, ARRAY_SIZE(serial_lines), str, &opts,
86 error_out);
86} 87}
87 88
88static int ssl_get_config(char *dev, char *str, int size, char **error_out) 89static int ssl_get_config(char *dev, char *str, int size, char **error_out)
@@ -91,9 +92,10 @@ static int ssl_get_config(char *dev, char *str, int size, char **error_out)
91 size, error_out); 92 size, error_out);
92} 93}
93 94
94static int ssl_remove(int n) 95static int ssl_remove(int n, char **error_out)
95{ 96{
96 return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n); 97 return line_remove(serial_lines, ARRAY_SIZE(serial_lines), n,
98 error_out);
97} 99}
98 100
99static int ssl_open(struct tty_struct *tty, struct file *filp) 101static int ssl_open(struct tty_struct *tty, struct file *filp)
@@ -212,7 +214,15 @@ __uml_exitcall(ssl_exit);
212 214
213static int ssl_chan_setup(char *str) 215static int ssl_chan_setup(char *str)
214{ 216{
215 return line_setup(serial_lines, ARRAY_SIZE(serial_lines), str); 217 char *error;
218 int ret;
219
220 ret = line_setup(serial_lines, ARRAY_SIZE(serial_lines), str, &error);
221 if(ret < 0)
222 printk(KERN_ERR "Failed to set up serial line with "
223 "configuration string \"%s\" : %s\n", str, error);
224
225 return 1;
216} 226}
217 227
218__setup("ssl", ssl_chan_setup); 228__setup("ssl", ssl_chan_setup);