[libvirt] [PATCH v4 04/12] hyperv: add hypervWqlQuery struct.

Matthias Bolte matthias.bolte at googlemail.com
Sat Apr 8 14:14:23 UTC 2017


2017-04-05 0:26 GMT+02:00 Dawid Zamirski <dzamirski at datto.com>:
> Since this is the last commit that will compile in the series, the
> remaining patches should be squashed into this one - they are kept
> separate only for code review purposes.
>
> This struct is to be passed to enumerate-and-pull wsman request (to run
> "Select" queries) and provides the hypervWmiClassInfoListPtr instance
> from which we can extract the version specific info using the new
> hypervGetWmiClassInfo function (currently unused)
> ---
>  src/hyperv/hyperv_wmi.c | 35 +++++++++++++++++++++++++++++++++++
>  src/hyperv/hyperv_wmi.h |  8 ++++++++
>  2 files changed, 43 insertions(+)

> diff --git a/src/hyperv/hyperv_wmi.h b/src/hyperv/hyperv_wmi.h
> index 5fc36e8..c7d82bc 100644
> --- a/src/hyperv/hyperv_wmi.h
> +++ b/src/hyperv/hyperv_wmi.h
> @@ -30,6 +30,7 @@
>  # include "openwsman.h"
>
>
> +# define HYPERV_WQL_QUERY_INITIALIZER { VIR_BUFFER_INITIALIZER, NULL }
>
>  typedef struct _hypervObject hypervObject;
>
> @@ -61,6 +62,13 @@ struct _hypervObjectUnified {
>      hypervObjectUnified *next;
>  };
>
> +typedef struct _hypervWqlQuery hypervWqlQuery;
> +typedef hypervWqlQuery *hypervWqlQueryPtr;
> +struct _hypervWqlQuery {
> +    virBuffer query;
> +    hypervWmiClassInfoListPtr info;
> +};

My suggestion to use a virBuffer instead of a virBufferPtr here wasn't
well though out. I switched this to virBufferPtr before pushing this
patch.

-- 
Matthias Bolte
http://photron.blogspot.com




More information about the libvir-list mailing list