summaryrefslogtreecommitdiffstats
path: root/include/hw
diff options
context:
space:
mode:
authorCorey Minyard2018-11-07 23:33:09 +0100
committerCorey Minyard2019-09-20 21:09:02 +0200
commita65f4d4028de99ce172ffa3c18095b4f1bf7ee45 (patch)
tree814a8191f51fead007d70d8eff8dd71b23b75c87 /include/hw
parenttests:ipmi: Fix IPMI BT tests (diff)
downloadqemu-a65f4d4028de99ce172ffa3c18095b4f1bf7ee45.tar.gz
qemu-a65f4d4028de99ce172ffa3c18095b4f1bf7ee45.tar.xz
qemu-a65f4d4028de99ce172ffa3c18095b4f1bf7ee45.zip
qdev: Add a no default uuid property
This is for IPMI, which will behave differently if the UUID is not set. Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Fam Zheng <famz@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/qdev-properties.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
index 2e98dd60db..c6a8cb5516 100644
--- a/include/hw/qdev-properties.h
+++ b/include/hw/qdev-properties.h
@@ -238,6 +238,13 @@ extern const PropertyInfo qdev_prop_pcie_link_width;
#define DEFINE_PROP_AUDIODEV(_n, _s, _f) \
DEFINE_PROP(_n, _s, _f, qdev_prop_audiodev, QEMUSoundCard)
+#define DEFINE_PROP_UUID_NODEFAULT(_name, _state, _field) { \
+ .name = (_name), \
+ .info = &qdev_prop_uuid, \
+ .offset = offsetof(_state, _field) \
+ + type_check(QemuUUID, typeof_field(_state, _field)), \
+ }
+
#define DEFINE_PROP_END_OF_LIST() \
{}