aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Apfelbaum <marcel.a@redhat.com>2014-12-16 16:58:05 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-12-22 23:12:27 +0000
commit2e16898a61a25cb76dd48f6e74f3b7a500d0c91a (patch)
treeb0d6df92e9ec56257bba615e0812731042c00511
parent49d2e648e8087d154d8bf8b91f27c8e05e79d5a6 (diff)
vl.c: simplified machine_set_property
Refactored the code to re-use object_property_parse. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Alexander Graf <agraf@suse.de> Reviewed-by: Greg Bellows <greg.bellows@linaro.org> Message-id: 1418217570-15517-3-git-send-email-marcel.a@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--vl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/vl.c b/vl.c
index 7537be43aa..fa7a02c8ef 100644
--- a/vl.c
+++ b/vl.c
@@ -2535,7 +2535,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;
@@ -2551,9 +2550,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) {