From 6e1db57b2ac9025c2443c665a0d9e78748637b26 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 1 Jun 2011 13:29:11 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- hw/msmouse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/msmouse.h') diff --git a/hw/msmouse.h b/hw/msmouse.h index 456cb21424..8b853b35bf 100644 --- a/hw/msmouse.h +++ b/hw/msmouse.h @@ -1,2 +1,2 @@ /* msmouse.c */ -CharDriverState *qemu_chr_open_msmouse(QemuOpts *opts); +int qemu_chr_open_msmouse(QemuOpts *opts, CharDriverState **_chr); -- cgit v1.2.1