aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel.a@redhat.com>2014-12-10 15:19:29 +0200
committerGreg Bellows <greg.bellows@linaro.org>2014-12-12 13:58:48 -0600
commit75b47c5464e982df5ff31ac15a25cf0eb281e40c (patch)
tree4fb9483fdc5b7ef11de98c3b49ed629e91175aff
parentf069df808a7885c6f077f504dd7889128040dfc6 (diff)
downloadqemu-tz-75b47c5464e982df5ff31ac15a25cf0eb281e40c.tar.gz
vl.c: simplified machine_set_property
Refactored the code to re-use object_property_parse. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Message-id: 1418217570-15517-3-git-send-email-marcel.a@redhat.com
-rw-r--r--vl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/vl.c b/vl.c
index fe53107e7..7a5800033 100644
--- a/vl.c
+++ b/vl.c
@@ -2597,7 +2597,6 @@ 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;
@@ -2613,9 +2612,7 @@ static int machine_set_property(const char *name, const char *value,
}
}
- siv = string_input_visitor_new(value);
- object_property_set(obj, string_input_get_visitor(siv), qom_name, &local_err);
- string_input_visitor_cleanup(siv);
+ object_property_parse(obj, value, qom_name, &local_err);
g_free(qom_name);
if (local_err) {