Patchwork [RFC,10/15] create object_prop_set_globals()

login
register
mail settings
Submitter Eduardo Habkost
Date Aug. 7, 2012, 7:56 p.m.
Message ID <1344369413-9053-11-git-send-email-ehabkost@redhat.com>
Download mbox | patch
Permalink /patch/175779/
State New
Headers show

Comments

Eduardo Habkost - Aug. 7, 2012, 7:56 p.m.
It's like qdev_prop_set_globals(), but calls object_property_parse().

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 global-properties.c | 5 +++++
 hw/qdev.h           | 1 +
 2 files changed, 6 insertions(+)

Patch

diff --git a/global-properties.c b/global-properties.c
index d99bcee..d827955 100644
--- a/global-properties.c
+++ b/global-properties.c
@@ -54,6 +54,11 @@  void qdev_prop_set_globals(DeviceState *dev)
     return object_set_globals(OBJECT(dev), qdev_global_parse);
 }
 
+void object_prop_set_globals(Object *obj)
+{
+    return object_set_globals(obj, object_property_parse);
+}
+
 static int qdev_add_one_global(QemuOpts *opts, void *opaque)
 {
     GlobalProperty *g;
diff --git a/hw/qdev.h b/hw/qdev.h
index 41db6c0..b522f11 100644
--- a/hw/qdev.h
+++ b/hw/qdev.h
@@ -331,6 +331,7 @@  void qdev_prop_set_ptr(DeviceState *dev, const char *name, void *value);
 
 void qdev_prop_register_global_list(GlobalProperty *props);
 void qdev_prop_set_globals(DeviceState *dev);
+void object_prop_set_globals(Object *obj);
 void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
                                     Property *prop, const char *value);