[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/19] baum: Chardev open error reporting, braille p
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH 17/19] baum: Chardev open error reporting, braille part |
Date: |
Tue, 7 Feb 2012 15:09:24 +0100 |
Convert to error_report(). Improves user-hostile messages like this
one
baum_init: brlapi_openConnection: connect: No such file or directory
chardev: opening backend "braille" failed
to
qemu-system-x86_64: -chardev braille,id=foo: Can't open braille: connect:
No such file or directory
chardev: opening backend "braille" failed
The uninformative extra "opening backend failed" message will be
cleaned up shortly.
Signed-off-by: Markus Armbruster <address@hidden>
---
hw/baum.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/hw/baum.c b/hw/baum.c
index 3e94f84..7453a15 100644
--- a/hw/baum.c
+++ b/hw/baum.c
@@ -585,14 +585,16 @@ CharDriverState *chr_baum_init(QemuOpts *opts)
baum->brlapi_fd = brlapi__openConnection(handle, NULL, NULL);
if (baum->brlapi_fd == -1) {
- brlapi_perror("baum_init: brlapi_openConnection");
+ error_report("Can't open braille: %s",
+ brlapi_strerror(&brlapi_error));
goto fail_handle;
}
baum->cellCount_timer = qemu_new_timer_ns(vm_clock,
baum_cellCount_timer_cb, baum);
if (brlapi__getDisplaySize(handle, &baum->x, &baum->y) == -1) {
- brlapi_perror("baum_init: brlapi_getDisplaySize");
+ error_report("Can't get braille display size: %s",
+ brlapi_strerror(&brlapi_error));
goto fail;
}
@@ -606,7 +608,8 @@ CharDriverState *chr_baum_init(QemuOpts *opts)
tty = BRLAPI_TTY_DEFAULT;
if (brlapi__enterTtyMode(handle, tty, NULL) == -1) {
- brlapi_perror("baum_init: brlapi_enterTtyMode");
+ error_report("Can't configure braille: %s",
+ brlapi_strerror(&brlapi_error));
goto fail;
}
--
1.7.6.5
- [Qemu-devel] [PATCH 14/19] console: Eliminate text_consoles[], (continued)
- [Qemu-devel] [PATCH 14/19] console: Eliminate text_consoles[], Markus Armbruster, 2012/02/07
- [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Markus Armbruster, 2012/02/07
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Kevin Wolf, 2012/02/07
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Markus Armbruster, 2012/02/09
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Kevin Wolf, 2012/02/09
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Markus Armbruster, 2012/02/09
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Luiz Capitulino, 2012/02/09
- Re: [Qemu-devel] [PATCH 10/19] qemu-char: Chardev open error reporting, !_WIN32 part, Markus Armbruster, 2012/02/09
[Qemu-devel] [PATCH 03/19] qemu-char: Re-apply style fixes from just reverted aad04cd0, Markus Armbruster, 2012/02/07
[Qemu-devel] [PATCH 17/19] baum: Chardev open error reporting, braille part,
Markus Armbruster <=
[Qemu-devel] [PATCH 11/19] qemu-char: Chardev open error reporting, _WIN32 part, Markus Armbruster, 2012/02/07
[Qemu-devel] [PATCH 15/19] console: Chardev open error reporting, console part, Markus Armbruster, 2012/02/07
[Qemu-devel] [PATCH 19/19] qemu-char: Fix legacy chardev syntax error reporting, Markus Armbruster, 2012/02/07
[Qemu-devel] [PATCH 18/19] qemu-char: Chardev open error reporting, generic part, Markus Armbruster, 2012/02/07
Re: [Qemu-devel] [PATCH 00/19] Fix and improve chardev open error messages, Kevin Wolf, 2012/02/07
Re: [Qemu-devel] [PATCH 00/19] Fix and improve chardev open error messages, Anthony Liguori, 2012/02/24