From 23084327dc5c2f42e8a1c3e39ec565e344c7f52e Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Thu, 21 Mar 2013 00:23:19 +0100 Subject: like acpi_table_install(), acpi_table_add() should propagate Errors Signed-off-by: Laszlo Ersek Reviewed-by: Anthony Liguori Message-id: 1363821803-3380-8-git-send-email-lersek@redhat.com Signed-off-by: Anthony Liguori --- hw/i386/pc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'hw/i386/pc.c') diff --git a/hw/i386/pc.c b/hw/i386/pc.c index d1bc0deb28..2e915ecd68 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -891,6 +891,7 @@ void pc_acpi_init(const char *default_dsdt) { char *filename = NULL, *arg = NULL; QemuOpts *opts; + Error *err = NULL; if (acpi_tables != NULL) { /* manually set via -acpitable, leave it alone */ @@ -909,8 +910,11 @@ void pc_acpi_init(const char *default_dsdt) opts = qemu_opts_parse(qemu_find_opts("acpi"), arg, 0); g_assert(opts != NULL); - if (acpi_table_add(opts) != 0) { - fprintf(stderr, "WARNING: failed to load %s\n", filename); + acpi_table_add(opts, &err); + if (err) { + fprintf(stderr, "WARNING: failed to load %s: %s\n", filename, + error_get_pretty(err)); + error_free(err); } g_free(arg); g_free(filename); -- cgit v1.2.3