aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2017-07-14 10:14:50 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2017-07-14 12:04:42 +0200
commit8f5d58ef2c92d7b82d9a6eeefd7c8854a183ba4a (patch)
treee2829b8ca3d04cdee2f37cc1a01419786ac494c9 /include/hw
parentd40d3da00c10f0169a26985ecb65033bff536f2c (diff)
qom: enforce readonly nature of link's check callback
link's check callback is supposed to verify/permit setting it, however currently nothing restricts it from misusing it and modifying target object from within. Make sure that readonly semantics are checked by compiler to prevent callback's misuse. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <20170714021509.23681-2-famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/qdev-properties.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
index 0604c337e0..9edded29d2 100644
--- a/include/hw/qdev-properties.h
+++ b/include/hw/qdev-properties.h
@@ -272,7 +272,8 @@ void qdev_prop_set_after_realize(DeviceState *dev, const char *name,
* This function should be used as the check() argument to
* object_property_add_link().
*/
-void qdev_prop_allow_set_link_before_realize(Object *obj, const char *name,
+void qdev_prop_allow_set_link_before_realize(const Object *obj,
+ const char *name,
Object *val, Error **errp);
#endif