summaryrefslogtreecommitdiffstats
path: root/hw/core/qdev-properties.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé2020-09-30 18:49:44 +0200
committerEduardo Habkost2020-10-06 17:09:35 +0200
commit79bdf29c08a592a4c5d2f9b7bb462e71ee568988 (patch)
treeb3f2a1fbb4a283121e304cd154d2b7223eae2ba9 /hw/core/qdev-properties.c
parenthw/core/qdev-properties: Export enum-related functions (diff)
downloadqemu-79bdf29c08a592a4c5d2f9b7bb462e71ee568988.tar.gz
qemu-79bdf29c08a592a4c5d2f9b7bb462e71ee568988.tar.xz
qemu-79bdf29c08a592a4c5d2f9b7bb462e71ee568988.zip
hw/core/qdev-properties: Export qdev_prop_enum
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200930164949.1425294-7-philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/core/qdev-properties.c')
-rw-r--r--hw/core/qdev-properties.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 76417d0936..31dfe441e2 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -86,6 +86,13 @@ void qdev_propinfo_set_default_value_enum(ObjectProperty *op,
qapi_enum_lookup(prop->info->enum_table, prop->defval.i));
}
+const PropertyInfo qdev_prop_enum = {
+ .name = "enum",
+ .get = qdev_propinfo_get_enum,
+ .set = qdev_propinfo_set_enum,
+ .set_default_value = qdev_propinfo_set_default_value_enum,
+};
+
/* Bit */
static uint32_t qdev_get_prop_mask(Property *prop)