From: Dawid Zamirski Date: Tue, 4 Apr 2017 22:26:05 +0000 (-0400) Subject: hyperv: store WMI version in hypervPrivate. X-Git-Tag: v3.3.0-rc1~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a993f1b404f3e6de0dd31010df30f475b6c61323;p=thirdparty%2Flibvirt.git hyperv: store WMI version in hypervPrivate. Hyper-V 2012+ uses a new "v2" version of Msvm_* WMI classes so we will store that info in hypervPrivate so that it is easily accessbile in the driver API callbacks and handled accordingly. --- diff --git a/src/hyperv/hyperv_private.h b/src/hyperv/hyperv_private.h index 574bb5fe8c..4e7069971f 100644 --- a/src/hyperv/hyperv_private.h +++ b/src/hyperv/hyperv_private.h @@ -28,11 +28,17 @@ # include "hyperv_util.h" # include "openwsman.h" -typedef struct _hypervPrivate hypervPrivate; +typedef enum _hypervWmiVersion hypervWmiVersion; +enum _hypervWmiVersion { + HYPERV_WMI_VERSION_V1, + HYPERV_WMI_VERSION_V2, +}; +typedef struct _hypervPrivate hypervPrivate; struct _hypervPrivate { hypervParsedUri *parsedUri; WsManClient *client; + hypervWmiVersion wmiVersion; }; #endif /* __HYPERV_PRIVATE_H__ */