[PATCH 0/8] more Hyper-V code cleanup

Here's a draft GitLab MR if you'd prefer to review the changes there: https://gitlab.com/iammattcoleman/libvirt/-/merge_requests/5 Matt Coleman (8): hyperv: g_autofree username and password in hypervConnectOpen() hyperv: remove spaces after hypervObject* casts hyperv: WMI class list function general cleanup hyperv: move hypervGetWmiClass to hyperv_wmi.h hyperv: move hypervGetProcSDByVSSDInstanceId to hyperv_wmi.c hyperv: consistent names for SettingData functions hyperv: minor formatting fix in hyperv_wmi.h hyperv: call openwsman's ws_serializer_free_mem src/hyperv/hyperv_driver.c | 87 ++++++++++---------------------------- src/hyperv/hyperv_wmi.c | 63 +++++++++++++++------------ src/hyperv/hyperv_wmi.h | 45 ++++++++++++++------ 3 files changed, 89 insertions(+), 106 deletions(-) -- 2.27.0

Signed-off-by: Matt Coleman <matt@datto.com> --- src/hyperv/hyperv_driver.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index a71d0d6261..5344d75585 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -421,8 +421,8 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, { virDrvOpenStatus result = VIR_DRV_OPEN_ERROR; hypervPrivate *priv = NULL; - char *username = NULL; - char *password = NULL; + g_autofree char *username = NULL; + g_autofree char *password = NULL; virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); @@ -472,8 +472,6 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, cleanup: hypervFreePrivate(&priv); - VIR_FREE(username); - VIR_FREE(password); return result; } -- 2.27.0

Signed-off-by: Matt Coleman <matt@datto.com> --- src/hyperv/hyperv_driver.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 5344d75585..c1748eed70 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -288,7 +288,7 @@ hypervLookupHostSystemBiosUuid(hypervPrivate *priv, unsigned char *uuid) result = 0; cleanup: - hypervFreeObject(priv, (hypervObject *) computerSystem); + hypervFreeObject(priv, (hypervObject *)computerSystem); return result; } @@ -553,7 +553,7 @@ hypervConnectGetVersion(virConnectPtr conn, unsigned long *version) result = 0; cleanup: - hypervFreeObject(priv, (hypervObject *) os); + hypervFreeObject(priv, (hypervObject *)os); return result; } @@ -613,7 +613,7 @@ hypervConnectGetMaxVcpus(virConnectPtr conn, const char *type G_GNUC_UNUSED) result = processorSettingData->data.common->VirtualQuantity; cleanup: - hypervFreeObject(priv, (hypervObject *) processorSettingData); + hypervFreeObject(priv, (hypervObject *)processorSettingData); return result; } @@ -925,8 +925,8 @@ hypervDomainShutdownFlags(virDomainPtr domain, unsigned int flags) result = 0; cleanup: - hypervFreeObject(priv, (hypervObject *) computerSystem); - hypervFreeObject(priv, (hypervObject *) shutdown); + hypervFreeObject(priv, (hypervObject *)computerSystem); + hypervFreeObject(priv, (hypervObject *)shutdown); return result; } @@ -1324,8 +1324,8 @@ hypervDomainGetAutostart(virDomainPtr domain, int *autostart) } cleanup: - hypervFreeObject(priv, (hypervObject *) vsgsd); - hypervFreeObject(priv, (hypervObject *) vssd); + hypervFreeObject(priv, (hypervObject *)vsgsd); + hypervFreeObject(priv, (hypervObject *)vssd); return result; } -- 2.27.0

* use the same section comment in the header and code * place the items in the same relative location within the .h and .c * one parameter per line for multiline function definitions Signed-off-by: Matt Coleman <matt@datto.com> --- src/hyperv/hyperv_wmi.c | 12 +++++------- src/hyperv/hyperv_wmi.h | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 66aed01832..42ab00e629 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -1550,12 +1550,13 @@ hypervMsvmComputerSystemFromDomain(virDomainPtr domain, /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Msvm_VirtualSystemSettingData + * Generic "Get WMI class list" helpers */ int hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv, - const char *uuid_string, Msvm_VirtualSystemSettingData **list) + const char *uuid_string, + Msvm_VirtualSystemSettingData **list) { g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER; @@ -1573,13 +1574,10 @@ hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv, } -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Msvm_MemorySettingData - */ - int hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv, - const char *vssd_instanceid, Msvm_MemorySettingData **list) + const char *vssd_instanceid, + Msvm_MemorySettingData **list) { g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER; diff --git a/src/hyperv/hyperv_wmi.h b/src/hyperv/hyperv_wmi.h index 5b97ab3db9..c8bb82ca6b 100644 --- a/src/hyperv/hyperv_wmi.h +++ b/src/hyperv/hyperv_wmi.h @@ -201,22 +201,10 @@ const char *hypervReturnCodeToString(int returnCode); -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Generic "Get WMI class list" helpers - */ - int hypervGetWmiClassList(hypervPrivate *priv, hypervWmiClassInfoListPtr wmiInfo, virBufferPtr query, hypervObject **wmiClass); -int hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv, - const char *uuid_string, - Msvm_VirtualSystemSettingData **list); - -int hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv, - const char *vssd_instanceid, - Msvm_MemorySettingData **list); - /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Msvm_ComputerSystem */ @@ -239,3 +227,15 @@ hypervMsvmComputerSystemFromUUID(hypervPrivate *priv, const char *uuid, int hypervMsvmComputerSystemFromDomain(virDomainPtr domain, Msvm_ComputerSystem **computerSystem); + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Generic "Get WMI class list" helpers + */ + +int hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv, + const char *uuid_string, + Msvm_VirtualSystemSettingData **list); + +int hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv, + const char *vssd_instanceid, + Msvm_MemorySettingData **list); -- 2.27.0

Signed-off-by: Matt Coleman <matt@datto.com> --- src/hyperv/hyperv_driver.c | 14 -------------- src/hyperv/hyperv_wmi.c | 15 +++++---------- src/hyperv/hyperv_wmi.h | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index c1748eed70..de38dce9db 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -48,20 +48,6 @@ VIR_LOG_INIT("hyperv.hyperv_driver"); * wrapper functions for commonly-accessed WMI objects and interfaces. */ -/** - * hypervGetWmiClass: - * @type: the type of the class being retrieved from WMI - * @class: double pointer where the class data will be stored - * - * Retrieve one or more classes from WMI. - * - * The following variables must exist in the caller: - * 1. hypervPrivate *priv - * 2. virBuffer query - */ -#define hypervGetWmiClass(type, class) \ - hypervGetWmiClassList(priv, type ## _WmiInfo, &query, (hypervObject **)class) - static int hypervGetProcessorsByName(hypervPrivate *priv, const char *name, Win32_Processor **processorList) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 42ab00e629..8e5d99ad70 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -918,8 +918,7 @@ hypervInvokeMethod(hypervPrivate *priv, MSVM_CONCRETEJOB_WQL_SELECT "WHERE InstanceID = '%s'", instanceID); - if (hypervGetWmiClassList(priv, Msvm_ConcreteJob_WmiInfo, &query, - (hypervObject **)&job) < 0 || job == NULL) + if (hypervGetWmiClass(Msvm_ConcreteJob, &job) < 0 || !job) goto cleanup; jobState = job->data.common->JobState; @@ -1333,8 +1332,7 @@ hypervInvokeMsvmComputerSystemRequestStateChange(virDomainPtr domain, MSVM_CONCRETEJOB_WQL_SELECT "WHERE InstanceID = '%s'", instanceID); - if (hypervGetWmiClassList(priv, Msvm_ConcreteJob_WmiInfo, &query, - (hypervObject **)&concreteJob) < 0) + if (hypervGetWmiClass(Msvm_ConcreteJob, &concreteJob) < 0) goto cleanup; if (concreteJob == NULL) { @@ -1523,8 +1521,7 @@ hypervMsvmComputerSystemFromUUID(hypervPrivate *priv, const char *uuid, "WHERE " MSVM_COMPUTERSYSTEM_WQL_VIRTUAL "AND Name = '%s'", uuid); - if (hypervGetWmiClassList(priv, Msvm_ComputerSystem_WmiInfo, &query, - (hypervObject **)computerSystem) < 0) + if (hypervGetWmiClass(Msvm_ComputerSystem, computerSystem) < 0) return -1; if (!*computerSystem) { @@ -1566,8 +1563,7 @@ hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv, "ResultClass = Msvm_VirtualSystemSettingData", uuid_string); - if (hypervGetWmiClassList(priv, Msvm_VirtualSystemSettingData_WmiInfo, &query, - (hypervObject **)list) < 0 || *list == NULL) + if (hypervGetWmiClass(Msvm_VirtualSystemSettingData, list) < 0 || !*list) return -1; return 0; @@ -1587,8 +1583,7 @@ hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv, "ResultClass = Msvm_MemorySettingData", vssd_instanceid); - if (hypervGetWmiClassList(priv, Msvm_MemorySettingData_WmiInfo, &query, - (hypervObject **)list) < 0 || *list == NULL) + if (hypervGetWmiClass(Msvm_MemorySettingData, list) < 0 || !*list) return -1; return 0; diff --git a/src/hyperv/hyperv_wmi.h b/src/hyperv/hyperv_wmi.h index c8bb82ca6b..72c8e54678 100644 --- a/src/hyperv/hyperv_wmi.h +++ b/src/hyperv/hyperv_wmi.h @@ -205,6 +205,20 @@ int hypervGetWmiClassList(hypervPrivate *priv, hypervWmiClassInfoListPtr wmiInfo, virBufferPtr query, hypervObject **wmiClass); +/** + * hypervGetWmiClass: + * @type: the type of the class being retrieved from WMI + * @class: double pointer where the class data will be stored + * + * Retrieve one or more classes from WMI. + * + * The following variables must exist in the caller: + * 1. hypervPrivate *priv + * 2. virBuffer query + */ +#define hypervGetWmiClass(type, class) \ + hypervGetWmiClassList(priv, type ## _WmiInfo, &query, (hypervObject **)class) + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Msvm_ComputerSystem */ -- 2.27.0

This places it next to existing related functions. Signed-off-by: Matt Coleman <matt@datto.com> --- src/hyperv/hyperv_driver.c | 26 -------------------------- src/hyperv/hyperv_wmi.c | 26 ++++++++++++++++++++++++++ src/hyperv/hyperv_wmi.h | 4 ++++ 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index de38dce9db..be87871085 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -182,32 +182,6 @@ hypervGetVirtualSystemByName(hypervPrivate *priv, const char *name, } - -static int -hypervGetProcSDByVSSDInstanceId(hypervPrivate *priv, const char *id, - Msvm_ProcessorSettingData **data) -{ - g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER; - virBufferEscapeSQL(&query, - "ASSOCIATORS OF {Msvm_VirtualSystemSettingData.InstanceID='%s'} " - "WHERE AssocClass = Msvm_VirtualSystemSettingDataComponent " - "ResultClass = Msvm_ProcessorSettingData", - id); - - if (hypervGetWmiClass(Msvm_ProcessorSettingData, data) < 0) - return -1; - - if (!*data) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("Could not look up processor setting data with virtual system instance ID '%s'"), - id); - return -1; - } - - return 0; -} - - static int hypervRequestStateChange(virDomainPtr domain, int state) { diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 8e5d99ad70..ebdb4c79fc 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -1570,6 +1570,32 @@ hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv, } +int +hypervGetProcSDByVSSDInstanceId(hypervPrivate *priv, + const char *id, + Msvm_ProcessorSettingData **data) +{ + g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER; + virBufferEscapeSQL(&query, + "ASSOCIATORS OF {Msvm_VirtualSystemSettingData.InstanceID='%s'} " + "WHERE AssocClass = Msvm_VirtualSystemSettingDataComponent " + "ResultClass = Msvm_ProcessorSettingData", + id); + + if (hypervGetWmiClass(Msvm_ProcessorSettingData, data) < 0) + return -1; + + if (!*data) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Could not look up processor setting data with virtual system instance ID '%s'"), + id); + return -1; + } + + return 0; +} + + int hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv, const char *vssd_instanceid, diff --git a/src/hyperv/hyperv_wmi.h b/src/hyperv/hyperv_wmi.h index 72c8e54678..c06453c1fd 100644 --- a/src/hyperv/hyperv_wmi.h +++ b/src/hyperv/hyperv_wmi.h @@ -250,6 +250,10 @@ int hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv, const char *uuid_string, Msvm_VirtualSystemSettingData **list); +int hypervGetProcSDByVSSDInstanceId(hypervPrivate *priv, + const char *id, + Msvm_ProcessorSettingData **data); + int hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv, const char *vssd_instanceid, Msvm_MemorySettingData **list); -- 2.27.0

Signed-off-by: Matt Coleman <matt@datto.com> --- src/hyperv/hyperv_driver.c | 27 +++++++++++++-------------- src/hyperv/hyperv_wmi.c | 12 ++++++------ src/hyperv/hyperv_wmi.h | 12 ++++++------ 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index be87871085..007210f824 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -985,14 +985,14 @@ hypervDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info) &virtualSystemSettingData) < 0) goto cleanup; - if (hypervGetProcSDByVSSDInstanceId(priv, - virtualSystemSettingData->data.common->InstanceID, - &processorSettingData) < 0) + if (hypervGetProcessorSD(priv, + virtualSystemSettingData->data.common->InstanceID, + &processorSettingData) < 0) goto cleanup; - if (hypervGetMsvmMemorySettingDataFromVSSD(priv, - virtualSystemSettingData->data.common->InstanceID, - &memorySettingData) < 0) + if (hypervGetMemorySD(priv, + virtualSystemSettingData->data.common->InstanceID, + &memorySettingData) < 0) goto cleanup; /* Fill struct */ @@ -1068,14 +1068,14 @@ hypervDomainGetXMLDesc(virDomainPtr domain, unsigned int flags) &virtualSystemSettingData) < 0) goto cleanup; - if (hypervGetProcSDByVSSDInstanceId(priv, - virtualSystemSettingData->data.common->InstanceID, - &processorSettingData) < 0) + if (hypervGetProcessorSD(priv, + virtualSystemSettingData->data.common->InstanceID, + &processorSettingData) < 0) goto cleanup; - if (hypervGetMsvmMemorySettingDataFromVSSD(priv, - virtualSystemSettingData->data.common->InstanceID, - &memorySettingData) < 0) + if (hypervGetMemorySD(priv, + virtualSystemSettingData->data.common->InstanceID, + &memorySettingData) < 0) goto cleanup; /* Fill struct */ @@ -1817,8 +1817,7 @@ hypervDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory, if (hypervGetMsvmVirtualSystemSettingDataFromUUID(priv, uuid_string, &vssd) < 0) goto cleanup; - if (hypervGetMsvmMemorySettingDataFromVSSD(priv, vssd->data.common->InstanceID, - &memsd) < 0) + if (hypervGetMemorySD(priv, vssd->data.common->InstanceID, &memsd) < 0) goto cleanup; if (priv->wmiVersion == HYPERV_WMI_VERSION_V1) { diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index ebdb4c79fc..f2c7c365fa 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -1571,9 +1571,9 @@ hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv, int -hypervGetProcSDByVSSDInstanceId(hypervPrivate *priv, - const char *id, - Msvm_ProcessorSettingData **data) +hypervGetProcessorSD(hypervPrivate *priv, + const char *id, + Msvm_ProcessorSettingData **data) { g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER; virBufferEscapeSQL(&query, @@ -1597,9 +1597,9 @@ hypervGetProcSDByVSSDInstanceId(hypervPrivate *priv, int -hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv, - const char *vssd_instanceid, - Msvm_MemorySettingData **list) +hypervGetMemorySD(hypervPrivate *priv, + const char *vssd_instanceid, + Msvm_MemorySettingData **list) { g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER; diff --git a/src/hyperv/hyperv_wmi.h b/src/hyperv/hyperv_wmi.h index c06453c1fd..bf9c3b3bd3 100644 --- a/src/hyperv/hyperv_wmi.h +++ b/src/hyperv/hyperv_wmi.h @@ -250,10 +250,10 @@ int hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv, const char *uuid_string, Msvm_VirtualSystemSettingData **list); -int hypervGetProcSDByVSSDInstanceId(hypervPrivate *priv, - const char *id, - Msvm_ProcessorSettingData **data); +int hypervGetProcessorSD(hypervPrivate *priv, + const char *id, + Msvm_ProcessorSettingData **data); -int hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv, - const char *vssd_instanceid, - Msvm_MemorySettingData **list); +int hypervGetMemorySD(hypervPrivate *priv, + const char *vssd_instanceid, + Msvm_MemorySettingData **list); -- 2.27.0

Signed-off-by: Matt Coleman <matt@datto.com> --- src/hyperv/hyperv_wmi.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hyperv/hyperv_wmi.h b/src/hyperv/hyperv_wmi.h index bf9c3b3bd3..5c5597e27b 100644 --- a/src/hyperv/hyperv_wmi.h +++ b/src/hyperv/hyperv_wmi.h @@ -235,9 +235,8 @@ int hypervMsvmComputerSystemToDomain(virConnectPtr conn, Msvm_ComputerSystem *computerSystem, virDomainPtr *domain); -int -hypervMsvmComputerSystemFromUUID(hypervPrivate *priv, const char *uuid, - Msvm_ComputerSystem **computerSystem); +int hypervMsvmComputerSystemFromUUID(hypervPrivate *priv, const char *uuid, + Msvm_ComputerSystem **computerSystem); int hypervMsvmComputerSystemFromDomain(virDomainPtr domain, Msvm_ComputerSystem **computerSystem); -- 2.27.0

This should have been included with the upgrade to openwsman 2.6.3. Signed-off-by: Matt Coleman <matt@datto.com> --- src/hyperv/hyperv_wmi.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index f2c7c365fa..1d0d33ec6d 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -41,8 +41,6 @@ #include "virlog.h" #include "virxml.h" -#define WS_SERIALIZER_FREE_MEM_WORKS 0 - #define VIR_FROM_THIS VIR_FROM_HYPERV #define HYPERV_JOB_TIMEOUT_MS 300000 @@ -1120,12 +1118,10 @@ hypervEnumAndPull(hypervPrivate *priv, hypervWqlQueryPtr wqlQuery, filter_destroy(filter); if (data != NULL) { -#if WS_SERIALIZER_FREE_MEM_WORKS if (ws_serializer_free_mem(serializerContext, data, wmiInfo->serializerInfo) < 0) { VIR_ERROR(_("Could not free deserialized data")); } -#endif } VIR_FREE(query_string); @@ -1141,26 +1137,20 @@ void hypervFreeObject(hypervPrivate *priv G_GNUC_UNUSED, hypervObject *object) { hypervObject *next; -#if WS_SERIALIZER_FREE_MEM_WORKS WsSerializerContextH serializerContext; -#endif if (object == NULL) return; -#if WS_SERIALIZER_FREE_MEM_WORKS serializerContext = wsmc_get_serialization_context(priv->client); -#endif while (object != NULL) { next = object->next; -#if WS_SERIALIZER_FREE_MEM_WORKS if (ws_serializer_free_mem(serializerContext, object->data.common, object->info->serializerInfo) < 0) { VIR_ERROR(_("Could not free deserialized data")); } -#endif VIR_FREE(object); -- 2.27.0

On Mon, Nov 2, 2020 at 7:22 PM Matt Coleman <mcoleman@datto.com> wrote:
Here's a draft GitLab MR if you'd prefer to review the changes there: https://gitlab.com/iammattcoleman/libvirt/-/merge_requests/5
Matt Coleman (8): hyperv: g_autofree username and password in hypervConnectOpen() hyperv: remove spaces after hypervObject* casts hyperv: WMI class list function general cleanup hyperv: move hypervGetWmiClass to hyperv_wmi.h hyperv: move hypervGetProcSDByVSSDInstanceId to hyperv_wmi.c hyperv: consistent names for SettingData functions hyperv: minor formatting fix in hyperv_wmi.h hyperv: call openwsman's ws_serializer_free_mem
src/hyperv/hyperv_driver.c | 87 ++++++++++---------------------------- src/hyperv/hyperv_wmi.c | 63 +++++++++++++++------------ src/hyperv/hyperv_wmi.h | 45 ++++++++++++++------ 3 files changed, 89 insertions(+), 106 deletions(-)
-- 2.27.0
Series LGTM. Reviewed-by: Neal Gompa <ngompa13@gmail.com> -- 真実はいつも一つ!/ Always, there's only one truth!

On 11/3/20 1:22 AM, Matt Coleman wrote:
Here's a draft GitLab MR if you'd prefer to review the changes there: https://gitlab.com/iammattcoleman/libvirt/-/merge_requests/5
Matt Coleman (8): hyperv: g_autofree username and password in hypervConnectOpen() hyperv: remove spaces after hypervObject* casts hyperv: WMI class list function general cleanup hyperv: move hypervGetWmiClass to hyperv_wmi.h hyperv: move hypervGetProcSDByVSSDInstanceId to hyperv_wmi.c hyperv: consistent names for SettingData functions hyperv: minor formatting fix in hyperv_wmi.h hyperv: call openwsman's ws_serializer_free_mem
src/hyperv/hyperv_driver.c | 87 ++++++++++---------------------------- src/hyperv/hyperv_wmi.c | 63 +++++++++++++++------------ src/hyperv/hyperv_wmi.h | 45 ++++++++++++++------ 3 files changed, 89 insertions(+), 106 deletions(-)
Reviewed-by: Michal Privoznik <mprivozn@redhat.com> and pushed. Michal
participants (3)
-
Matt Coleman
-
Michal Privoznik
-
Neal Gompa