From 7983c8a335dd09fec49f99a44d4404aa87828c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 9 Jan 2013 03:58:10 +0100 Subject: qdev: Fold state enum into bool realized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Andreas Färber Signed-off-by: Anthony Liguori --- hw/qdev-properties-system.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'hw/qdev-properties-system.c') diff --git a/hw/qdev-properties-system.c b/hw/qdev-properties-system.c index c73c713..ce0f793 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; } -- cgit v1.1