diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-06-07 20:36:08 +0400 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-06-20 14:31:32 +0200 |
commit | 76318657a803c542cdee232c8507dec8004e2478 (patch) | |
tree | 9695ca941d9ed5a9fbacc0903a2e86ce832a6839 /hw/core | |
parent | 85bbd1e7a4aea4c6d4d636d300c3f405afa98285 (diff) |
qdev: wrap default property value in an union
Wrap the Property default value (an int64_t) in a union, to prepare
for the next patch adding a uint64_t.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170607163635.17635-17-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw/core')
-rw-r--r-- | hw/core/qdev-properties.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index c5e028a45e..f3f682c611 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -71,7 +71,7 @@ static void set_enum(Object *obj, Visitor *v, const char *name, void *opaque, static void set_default_value_enum(Object *obj, const Property *prop) { - object_property_set_str(obj, prop->info->enum_table[prop->defval], + object_property_set_str(obj, prop->info->enum_table[prop->defval.i], prop->name, &error_abort); } @@ -128,7 +128,7 @@ static void prop_set_bit(Object *obj, Visitor *v, const char *name, static void set_default_value_bool(Object *obj, const Property *prop) { - object_property_set_bool(obj, prop->defval, prop->name, &error_abort); + object_property_set_bool(obj, prop->defval.i, prop->name, &error_abort); } PropertyInfo qdev_prop_bit = { @@ -261,7 +261,7 @@ static void set_uint8(Object *obj, Visitor *v, const char *name, void *opaque, static void set_default_value_int(Object *obj, const Property *prop) { - object_property_set_int(obj, prop->defval, prop->name, &error_abort); + object_property_set_int(obj, prop->defval.i, prop->name, &error_abort); } PropertyInfo qdev_prop_uint8 = { |