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 Date: Thu, 24 Jul 2014 14:11:39 -0400 (EDT) From: Marcel Apfelbaum 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-next] machine: Clean up -machine handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?utf-8?Q?F=C3=A4rber?= Cc: Paolo Bonzini , qemu-devel@nongnu.org, Anthony Liguori ----- Original Message ----- From: "Andreas F=C3=A4rber" To: qemu-devel@nongnu.org Cc: "marcel a" , "Andreas F=C3=A4rber" , "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=C3=A4rber --- 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); } =20 -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 =3D OBJECT(opaque); StringInputVisitor *siv; Error *local_err =3D NULL; char *c, *qom_name; =20 - if (strcmp(name, "qom-type") =3D=3D 0 || strcmp(name, "id") =3D=3D 0 |= | - strcmp(name, "type") =3D=3D 0) { + if (strcmp(name, "type") =3D=3D 0) { return 0; } =20 @@ -4226,7 +4226,7 @@ int main(int argc, char **argv, char **envp) } =20 machine_opts =3D qemu_get_machine_opts(); - if (qemu_opt_foreach(machine_opts, object_set_property, current_machin= e, + if (qemu_opt_foreach(machine_opts, machine_set_property, current_machi= ne, 1) < 0) { object_unref(OBJECT(current_machine)); exit(1); --=20 1.8.4.5 I was thinking about exactly the same thing. Reviewed-by Marcel Apfelbaum Thanks, Marcel