Re: [PATCH 05/15] qdev: Add a no default uuid property

2019-09-22 Thread Cédric Le Goater
On 19/09/2019 23:39, miny...@acm.org wrote:
> From: Corey Minyard 
> 
> This is for IPMI, which will behave differently if the UUID is
> not set.
> 
> Signed-off-by: Corey Minyard 
> Cc: Fam Zheng 
> Cc: Michael S. Tsirkin 
> Cc: Marc-André Lureau 

Reviewed-by: Cédric Le Goater 

C.


> ---
>  include/hw/qdev-properties.h | 7 +++
>  1 file changed, 7 insertions(+)
> 
> 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  = _prop_uuid,  \
> +.offset= offsetof(_state, _field)  \
> ++ type_check(QemuUUID, typeof_field(_state, _field)),  \
> +}
> +
>  #define DEFINE_PROP_END_OF_LIST()   \
>  {}
>  
> 




[PATCH 05/15] qdev: Add a no default uuid property

2019-09-19 Thread minyard
From: Corey Minyard 

This is for IPMI, which will behave differently if the UUID is
not set.

Signed-off-by: Corey Minyard 
Cc: Fam Zheng 
Cc: Michael S. Tsirkin 
Cc: Marc-André Lureau 
---
 include/hw/qdev-properties.h | 7 +++
 1 file changed, 7 insertions(+)

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  = _prop_uuid,  \
+.offset= offsetof(_state, _field)  \
++ type_check(QemuUUID, typeof_field(_state, _field)),  \
+}
+
 #define DEFINE_PROP_END_OF_LIST()   \
 {}
 
-- 
2.17.1




[Qemu-devel] [PATCH 05/15] qdev: Add a no default uuid property

2019-08-19 Thread minyard
From: Corey Minyard 

This is for IPMI, which will behave differently if the UUID is
not set.

Signed-off-by: Corey Minyard 
Cc: Fam Zheng 
Cc: Michael S. Tsirkin 
Cc: Marc-André Lureau 
---
 include/hw/qdev-properties.h | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h
index bb34a614e2..47b7029ccd 100644
--- a/include/hw/qdev-properties.h
+++ b/include/hw/qdev-properties.h
@@ -235,6 +235,13 @@ extern const PropertyInfo qdev_prop_pcie_link_width;
 .set_default = true,   \
 }
 
+#define DEFINE_PROP_UUID_NODEFAULT(_name, _state, _field) {\
+.name  = (_name),  \
+.info  = _prop_uuid,  \
+.offset= offsetof(_state, _field)  \
++ type_check(QemuUUID, typeof_field(_state, _field)),  \
+}
+
 #define DEFINE_PROP_END_OF_LIST()   \
 {}
 
-- 
2.17.1