aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev-properties-system.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2013-03-25 13:40:44 +0000
committerAnthony Liguori <aliguori@us.ibm.com>2013-03-26 09:26:49 -0500
commitb000dfbd42e8aac9af66ae0ed787ef1021bea29f (patch)
tree83208f9f96b6b7b09274173a9b94732112955bc4 /hw/qdev-properties-system.c
parentc19f806e01ba5c4a4d4fac80b76841512ed4a11e (diff)
hw/qdev-properties.c: Improve diagnostic for setting property after realize
Now we have error_setg() we can improve the error message emitted if you attempt to set a property of a device after the device is realized (the previous message was "permission denied" which was not very informative). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1364218844-7509-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev-properties-system.c')
-rw-r--r--hw/qdev-properties-system.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/qdev-properties-system.c b/hw/qdev-properties-system.c
index 87951444a1..28813d3978 100644
--- a/hw/qdev-properties-system.c
+++ b/hw/qdev-properties-system.c
@@ -43,7 +43,7 @@ static void set_pointer(Object *obj, Visitor *v, Property *prop,
int ret;
if (dev->realized) {
- error_set(errp, QERR_PERMISSION_DENIED);
+ qdev_prop_set_after_realize(dev, name, errp);
return;
}
@@ -287,7 +287,7 @@ static void set_vlan(Object *obj, Visitor *v, void *opaque,
NetClientState *hubport;
if (dev->realized) {
- error_set(errp, QERR_PERMISSION_DENIED);
+ qdev_prop_set_after_realize(dev, name, errp);
return;
}