[libvirt PATCH v3 16/51] virxml: Add virXMLPropTristateSwitch

Michal Privoznik mprivozn at redhat.com
Mon Mar 22 12:23:28 UTC 2021


On 3/19/21 4:57 PM, Tim Wiederhake wrote:
> Convenience function to return value of an on / off attribute.
> 
> Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
> ---
>   src/libvirt_private.syms |  1 +
>   src/util/virxml.c        | 41 ++++++++++++++++++++++++++++++++++++++++
>   src/util/virxml.h        |  6 +++++-
>   3 files changed, 47 insertions(+), 1 deletion(-)
> 

> diff --git a/src/util/virxml.h b/src/util/virxml.h
> index 3041c37df3..e844cb0713 100644
> --- a/src/util/virxml.h
> +++ b/src/util/virxml.h
> @@ -80,8 +80,12 @@ char *     virXMLPropStringLimit(xmlNodePtr node,
>   char *   virXMLNodeContentString(xmlNodePtr node);
>   int       virXMLPropTristateBool(xmlNodePtr node,
>                                    const char *name,
> -                                 bool mandatory,
> +                                 bool required,
>                                    virTristateBool *result);

I guess this doesn't belong here. I'll squash it into the previous patch.

> +int     virXMLPropTristateSwitch(xmlNodePtr node,
> +                                 const char *name,
> +                                 bool required,
> +                                 virTristateSwitch *result);
>   
>   /* Internal function; prefer the macros below.  */
>   xmlDocPtr      virXMLParseHelper(int domcode,
> 

Michal




More information about the libvir-list mailing list