summaryrefslogtreecommitdiffstats
path: root/hw/core/qdev-properties.c
diff options
context:
space:
mode:
authorMarkus Armbruster2016-03-15 19:34:49 +0100
committerMarkus Armbruster2016-03-21 21:29:02 +0100
commit55e8a154359be12ca4c9730c562d1e3d4b1bd2a1 (patch)
tree2f28a748ff703175154099bf055382e4654e8d4d /hw/core/qdev-properties.c
parentivshmem: Inline check_shm_size() into its only caller (diff)
downloadqemu-55e8a154359be12ca4c9730c562d1e3d4b1bd2a1.tar.gz
qemu-55e8a154359be12ca4c9730c562d1e3d4b1bd2a1.tar.xz
qemu-55e8a154359be12ca4c9730c562d1e3d4b1bd2a1.zip
qdev: New DEFINE_PROP_ON_OFF_AUTO
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <1458066895-20632-35-git-send-email-armbru@redhat.com>
Diffstat (limited to 'hw/core/qdev-properties.c')
-rw-r--r--hw/core/qdev-properties.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index bc89800246..d2f5a08af6 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -516,6 +516,16 @@ PropertyInfo qdev_prop_macaddr = {
.set = set_mac,
};
+/* --- on/off/auto --- */
+
+PropertyInfo qdev_prop_on_off_auto = {
+ .name = "OnOffAuto",
+ .description = "on/off/auto",
+ .enum_table = OnOffAuto_lookup,
+ .get = get_enum,
+ .set = set_enum,
+};
+
/* --- lost tick policy --- */
QEMU_BUILD_BUG_ON(sizeof(LostTickPolicy) != sizeof(int));