aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include/line.h
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-02-10 04:43:53 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 13:51:21 -0500
commitf28169d2000177e8b72ccc6d72887be779dceca8 (patch)
tree0ef842014c67d8a136cc26c99113b69e2ede87ea /arch/um/include/line.h
parentd79a580936396bbcd2f4fae2c6215f9cf81e3c0d (diff)
[PATCH] uml: return hotplug errors to host
I noticed that errors happening while hotplugging devices from the host were never returned back to the mconsole client. In some cases, success was returned instead of even an information-free error. This patch cleans that up by having the low-level configuration code pass back an error string along with an error code. At the top level, which knows whether it is early boot time or responding to an mconsole request, the string is printk'd or returned to the mconsole client. There are also whitespace and trivial code cleanups in the surrounding code. Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/include/line.h')
-rw-r--r--arch/um/include/line.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/um/include/line.h b/arch/um/include/line.h
index b79643eeee08..a2486b4cc9fe 100644
--- a/arch/um/include/line.h
+++ b/arch/um/include/line.h
@@ -76,7 +76,7 @@ struct lines {
76extern void line_close(struct tty_struct *tty, struct file * filp); 76extern void line_close(struct tty_struct *tty, struct file * filp);
77extern int line_open(struct line *lines, struct tty_struct *tty); 77extern int line_open(struct line *lines, struct tty_struct *tty);
78extern int line_setup(struct line *lines, unsigned int sizeof_lines, 78extern int line_setup(struct line *lines, unsigned int sizeof_lines,
79 char *init); 79 char *init, char **error_out);
80extern int line_write(struct tty_struct *tty, const unsigned char *buf, 80extern int line_write(struct tty_struct *tty, const unsigned char *buf,
81 int len); 81 int len);
82extern void line_put_char(struct tty_struct *tty, unsigned char ch); 82extern void line_put_char(struct tty_struct *tty, unsigned char ch);
@@ -102,9 +102,11 @@ extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts);
102extern void close_lines(struct line *lines, int nlines); 102extern void close_lines(struct line *lines, int nlines);
103 103
104extern int line_config(struct line *lines, unsigned int sizeof_lines, 104extern int line_config(struct line *lines, unsigned int sizeof_lines,
105 char *str, const struct chan_opts *opts); 105 char *str, const struct chan_opts *opts,
106 char **error_out);
106extern int line_id(char **str, int *start_out, int *end_out); 107extern int line_id(char **str, int *start_out, int *end_out);
107extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n); 108extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n,
109 char **error_out);
108extern int line_get_config(char *dev, struct line *lines, 110extern int line_get_config(char *dev, struct line *lines,
109 unsigned int sizeof_lines, char *str, 111 unsigned int sizeof_lines, char *str,
110 int size, char **error_out); 112 int size, char **error_out);