diff options
author | Andreas Färber <afaerber@suse.de> | 2013-01-09 03:58:10 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-15 18:26:30 -0600 |
commit | 7983c8a335dd09fec49f99a44d4404aa87828c0a (patch) | |
tree | c69919e4bfc2de020b0d9b12df47bfd8527aa50d /hw/qdev-properties-system.c | |
parent | 2c9ee0291f8ca7e18f8e96a34e8f4be7867219d2 (diff) |
qdev: Fold state enum into bool realized
Whether the device was initialized or not is QOM-level information and
currently unused. Drop it from device. This leaves the boolean state of
whether or not DeviceClass::init was called or not, a.k.a. "realized".
Suggested-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/qdev-properties-system.c')
-rw-r--r-- | hw/qdev-properties-system.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/qdev-properties-system.c b/hw/qdev-properties-system.c index c73c713080..ce0f7933e6 100644 --- a/hw/qdev-properties-system.c +++ b/hw/qdev-properties-system.c @@ -42,7 +42,7 @@ static void set_pointer(Object *obj, Visitor *v, Property *prop, char *str; int ret; - if (dev->state != DEV_STATE_CREATED) { + if (dev->realized) { error_set(errp, QERR_PERMISSION_DENIED); return; } @@ -254,7 +254,7 @@ static void set_vlan(Object *obj, Visitor *v, void *opaque, int32_t id; NetClientState *hubport; - if (dev->state != DEV_STATE_CREATED) { + if (dev->realized) { error_set(errp, QERR_PERMISSION_DENIED); return; } |