From: Marcel Apfelbaum <marcel.a@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH qom-next] machine: Clean up -machine handling
Date: Thu, 24 Jul 2014 14:11:39 -0400 (EDT) [thread overview]
Message-ID: <988179748.12886700.1406225499732.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <1406125931-22219-1-git-send-email-afaerber@suse.de>
----- Original Message -----
From: "Andreas Färber" <afaerber@suse.de>
To: qemu-devel@nongnu.org
Cc: "marcel a" <marcel.a@redhat.com>, "Andreas Färber" <afaerber@suse.de>, "Paolo Bonzini" <pbonzini@redhat.com>, "Anthony Liguori" <aliguori@amazon.com>
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 <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
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);
--
1.8.4.5
I was thinking about exactly the same thing.
Reviewed-by Marcel Apfelbaum <marcel.a@redhat.com>
Thanks,
Marcel
prev parent reply other threads:[~2014-07-24 18:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-23 14:32 [Qemu-devel] [PATCH qom-next] machine: Clean up -machine handling Andreas Färber
2014-07-24 18:11 ` Marcel Apfelbaum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=988179748.12886700.1406225499732.JavaMail.zimbra@redhat.com \
--to=marcel.a@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).