From f28169d2000177e8b72ccc6d72887be779dceca8 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Sat, 10 Feb 2007 01:43:53 -0800 Subject: [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 Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/kernel/tt/gdb.c | 4 ++-- arch/um/kernel/tt/gdb_kern.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/um/kernel/tt') diff --git a/arch/um/kernel/tt/gdb.c b/arch/um/kernel/tt/gdb.c index 786e4edd86c5..8eba8f7dca68 100644 --- a/arch/um/kernel/tt/gdb.c +++ b/arch/um/kernel/tt/gdb.c @@ -139,7 +139,7 @@ static void config_gdb_cb(void *arg) init_proxy(debugger_pid, 0, 0); } -int gdb_config(char *str) +int gdb_config(char *str, char **error_out) { struct gdb_data data; @@ -154,7 +154,7 @@ void remove_gdb_cb(void *unused) exit_debugger_cb(NULL); } -int gdb_remove(int unused) +int gdb_remove(int unused, char **error_out) { initial_thread_cb(remove_gdb_cb, NULL); return 0; diff --git a/arch/um/kernel/tt/gdb_kern.c b/arch/um/kernel/tt/gdb_kern.c index 68e1bf63cd0a..a1af96ef9ee2 100644 --- a/arch/um/kernel/tt/gdb_kern.c +++ b/arch/um/kernel/tt/gdb_kern.c @@ -8,8 +8,8 @@ #ifdef CONFIG_MCONSOLE -extern int gdb_config(char *str); -extern int gdb_remove(int n); +extern int gdb_config(char *str, char **error_out); +extern int gdb_remove(int n, char **error_out); static struct mc_device gdb_mc = { .name = "gdb", -- cgit v1.2.3-59-g8ed1b