From patchwork Thu Jul 24 18:11:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marcel Apfelbaum X-Patchwork-Id: 373483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A12AE14019F for ; Fri, 25 Jul 2014 04:12:10 +1000 (EST) Received: from localhost ([::1]:51240 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XANUu-0002PO-Go for incoming@patchwork.ozlabs.org; Thu, 24 Jul 2014 14:12:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XANUZ-00028t-4R for qemu-devel@nongnu.org; Thu, 24 Jul 2014 14:11:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XANUU-00018T-0G for qemu-devel@nongnu.org; Thu, 24 Jul 2014 14:11:47 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:38566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XANUT-00018K-OZ for qemu-devel@nongnu.org; Thu, 24 Jul 2014 14:11:41 -0400 Received: from zmail21.collab.prod.int.phx2.redhat.com (zmail21.collab.prod.int.phx2.redhat.com [10.5.83.24]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id s6OIBdQs021234; Thu, 24 Jul 2014 14:11:39 -0400 Date: Thu, 24 Jul 2014 14:11:39 -0400 (EDT) From: Marcel Apfelbaum To: Andreas =?utf-8?Q?F=C3=A4rber?= Message-ID: <988179748.12886700.1406225499732.JavaMail.zimbra@redhat.com> In-Reply-To: <1406125931-22219-1-git-send-email-afaerber@suse.de> References: <1406125931-22219-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-Originating-IP: [10.5.82.6] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - GC33 (Linux)/8.0.6_GA_5922) Thread-Topic: machine: Clean up -machine handling Thread-Index: 5scPKlpbEf0hPBW5+EgSvnIrTM2FDQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 209.132.183.24 Cc: Paolo Bonzini , qemu-devel@nongnu.org, Anthony Liguori Subject: Re: [Qemu-devel] [PATCH qom-next] machine: Clean up -machine handling X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org ----- Original Message ----- From: "Andreas Färber" To: qemu-devel@nongnu.org Cc: "marcel a" , "Andreas Färber" , "Paolo Bonzini" , "Anthony Liguori" Sent: Wednesday, July 23, 2014 5:32:11 PM Subject: [PATCH qom-next] machine: Clean up -machine handling Since commit c4090f8, -object options are no longer handled through object_set_property(), so clean up -object leftovers by renaming the function and dropping special-casing of qom-type and id properties. Cc: Paolo Bonzini Signed-off-by: Andreas Färber --- vl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index fe451aa..6e8472a 100644 --- a/vl.c +++ b/vl.c @@ -2818,15 +2818,15 @@ static void free_and_trace(gpointer mem) free(mem); } -static int object_set_property(const char *name, const char *value, void *opaque) +static int machine_set_property(const char *name, const char *value, + void *opaque) { Object *obj = OBJECT(opaque); StringInputVisitor *siv; Error *local_err = NULL; char *c, *qom_name; - if (strcmp(name, "qom-type") == 0 || strcmp(name, "id") == 0 || - strcmp(name, "type") == 0) { + if (strcmp(name, "type") == 0) { return 0; } @@ -4226,7 +4226,7 @@ int main(int argc, char **argv, char **envp) } machine_opts = qemu_get_machine_opts(); - if (qemu_opt_foreach(machine_opts, object_set_property, current_machine, + if (qemu_opt_foreach(machine_opts, machine_set_property, current_machine, 1) < 0) { object_unref(OBJECT(current_machine)); exit(1);