From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48867) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpz5T-0004Z6-Nl for qemu-devel@nongnu.org; Fri, 30 Sep 2016 10:46:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpz5S-0003Sp-PN for qemu-devel@nongnu.org; Fri, 30 Sep 2016 10:46:55 -0400 From: "Daniel P. Berrange" Date: Fri, 30 Sep 2016 15:45:42 +0100 Message-Id: <1475246744-29302-20-git-send-email-berrange@redhat.com> In-Reply-To: <1475246744-29302-1-git-send-email-berrange@redhat.com> References: <1475246744-29302-1-git-send-email-berrange@redhat.com> Subject: [Qemu-devel] [PATCH v14 19/21] acpi: convert to QObjectInputVisitor for -acpi parsing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, Markus Armbruster , Max Reitz , Paolo Bonzini , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Eric Blake , "Daniel P. Berrange" The -acpi command line option parsing uses the OptsVisitor currently. This is easily replaced by the QObjectInputVisitor instead. There is no need to enable any of the compatibility options, since the AcpiTableOptions QAPI struct only contains scalar properties. Signed-off-by: Daniel P. Berrange --- hw/acpi/core.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index e890a5d..67c0abe 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -25,7 +25,7 @@ #include "hw/acpi/acpi.h" #include "hw/nvram/fw_cfg.h" #include "qemu/config-file.h" -#include "qapi/opts-visitor.h" +#include "qapi/qobject-input-visitor.h" #include "qapi-visit.h" #include "qapi-event.h" @@ -237,14 +237,14 @@ void acpi_table_add(const QemuOpts *opts, Error **errp) char **cur; size_t bloblen = 0; char unsigned *blob = NULL; + Visitor *v; - { - Visitor *v; - - v = opts_visitor_new(opts); - visit_type_AcpiTableOptions(v, NULL, &hdrs, &err); - visit_free(v); + v = qobject_input_visitor_new_opts(opts, false, 0, false, false, &err); + if (err) { + goto out; } + visit_type_AcpiTableOptions(v, NULL, &hdrs, &err); + visit_free(v); if (err) { goto out; -- 2.7.4