aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2011-06-01 13:29:11 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-07-23 11:18:57 -0500
commit6e1db57b2ac9025c2443c665a0d9e78748637b26 (patch)
treecb4b73d71dccfc14737c713b07ee3bf89a3c0cf2 /ui
parent84682834eb8f654da5e03a92930d80b8ae0d3065 (diff)
qemu-char: Print strerror message on failure
The only way for chardev drivers to communicate an error was to return a NULL pointer, which resulted in an error message that said _that_ something went wrong, but not _why_. This patch changes the interface to return 0/-errno and updates qemu_chr_open_opts to use strerror to display a more helpful error message. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/qemu-spice.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/qemu-spice.h b/ui/qemu-spice.h
index 3c6f1fe41..f34be69f5 100644
--- a/ui/qemu-spice.h
+++ b/ui/qemu-spice.h
@@ -42,7 +42,7 @@ int qemu_spice_migrate_info(const char *hostname, int port, int tls_port,
void do_info_spice_print(Monitor *mon, const QObject *data);
void do_info_spice(Monitor *mon, QObject **ret_data);
-CharDriverState *qemu_chr_open_spice(QemuOpts *opts);
+int qemu_chr_open_spice(QemuOpts *opts, CharDriverState **_chr);
#else /* CONFIG_SPICE */