aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev.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.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.c')
-rw-r--r--hw/qdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 708a058a91..04ec4565b3 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -562,7 +562,7 @@ static void qdev_set_legacy_property(Object *obj, Visitor *v, void *opaque,
int ret;
if (dev->realized) {
- error_set(errp, QERR_PERMISSION_DENIED);
+ qdev_prop_set_after_realize(dev, name, errp);
return;
}