[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>
This commit is contained in:
Jeff Dike
2007-02-10 01:43:53 -08:00
committed by Linus Torvalds
parent d79a580936
commit f28169d200
12 changed files with 253 additions and 238 deletions

View File

@@ -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;