mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
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>
This commit is contained in:
parent
c19f806e01
commit
b000dfbd42
5 changed files with 43 additions and 17 deletions
|
@ -42,7 +42,7 @@ static void set_taddr(Object *obj, Visitor *v, void *opaque,
|
|||
int64_t value;
|
||||
|
||||
if (dev->realized) {
|
||||
error_set(errp, QERR_PERMISSION_DENIED);
|
||||
qdev_prop_set_after_realize(dev, name, errp);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue