]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qdev: Add a no default uuid property
authorCorey Minyard <cminyard@mvista.com>
Wed, 7 Nov 2018 22:33:09 +0000 (16:33 -0600)
committerCorey Minyard <cminyard@mvista.com>
Fri, 20 Sep 2019 19:09:02 +0000 (14:09 -0500)
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>
include/hw/qdev-properties.h

index 2e98dd60db85eae32442375f0f193a09beb64d79..c6a8cb551667b993a9112fed1070e62457d24437 100644 (file)
@@ -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()               \
     {}