mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
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>
This commit is contained in:
committed by
Paolo Bonzini
parent
d40d3da00c
commit
8f5d58ef2c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user