aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2018-11-07 16:33:09 -0600
committerCorey Minyard <cminyard@mvista.com>2019-09-20 14:09:02 -0500
commita65f4d4028de99ce172ffa3c18095b4f1bf7ee45 (patch)
tree814a8191f51fead007d70d8eff8dd71b23b75c87
parent77cd44b9ec57f69d8e99cdc8f3ea7af2ff96fc55 (diff)
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>
-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() \
{}