@@ -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;
}
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 <armbru@redhat.com> --- hw/baum.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-)