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>
This commit is contained in:
Corey Minyard 2018-11-07 16:33:09 -06:00
parent 77cd44b9ec
commit a65f4d4028

View 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() \
{}