hyperv: return void from hypervAddEprParam

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Ján Tomko committed 2026-06-25 10:43:05 +02:00
1 parent 35111b967b
commit ae2809ddd8
3 files changed
+13 -19

No files matched your search

+5 -8
View File
@@ -2968,8 +2968,7 @@ hypervDomainUndefineFlags(virDomainPtr domain, unsigned int flags)
virBufferEscapeSQL(&eprQuery, MSVM_COMPUTERSYSTEM_WQL_SELECT "WHERE Name = '%s'", uuid_string);
if (hypervAddEprParam(params, "AffectedSystem", &eprQuery, Msvm_ComputerSystem_WmiInfo) < 0)
return -1;
hypervAddEprParam(params, "AffectedSystem", &eprQuery, Msvm_ComputerSystem_WmiInfo);
/* actually destroy the VM */
if (hypervInvokeMethod(priv, &params, NULL) < 0)
@@ -4238,9 +4237,8 @@ hypervDomainSnapshotCreateXML(virDomainPtr domain,
if (!params)
return NULL;
if (hypervAddEprParam(params, "AffectedSystem", &eprQuery,
Msvm_ComputerSystem_WmiInfo) < 0)
return NULL;
hypervAddEprParam(params, "AffectedSystem", &eprQuery,
Msvm_ComputerSystem_WmiInfo);
snapshotSettings = hypervCreateEmbeddedParam(Msvm_VirtualSystemSnapshotSettingData_WmiInfo);
if (!snapshotSettings)
@@ -4304,9 +4302,8 @@ hypervDomainSnapshotDelete(virDomainSnapshotPtr snapshot,
if (!params)
return -1;
if (hypervAddEprParam(params, "AffectedSnapshot", &eprQuery,
Msvm_VirtualSystemSettingData_WmiInfo) < 0)
return -1;
hypervAddEprParam(params, "AffectedSnapshot", &eprQuery,
Msvm_VirtualSystemSettingData_WmiInfo);
/* Invoke the method */
if (hypervInvokeMethod(priv, &params, NULL) < 0)
+4 -7
View File
@@ -231,9 +231,9 @@ hypervAddSimpleParam(hypervInvokeParamsList *params, const char *name,
* @query: WQL filter
* @eprInfo: WmiInfo of the object being filtered
*
* Adds an EPR param to the params list. Returns -1 on failure, 0 on success.
* Adds an EPR param to the params list.
*/
int
void
hypervAddEprParam(hypervInvokeParamsList *params,
const char *name,
virBuffer *query,
@@ -249,8 +249,6 @@ hypervAddEprParam(hypervInvokeParamsList *params,
p->epr.query = query;
p->epr.info = classInfo;
params->nbParams++;
return 0;
}
@@ -1730,9 +1728,8 @@ hypervMsvmVSMSAddResourceSettings(virDomainPtr domain,
if (!params)
return -1;
if (hypervAddEprParam(params, "AffectedConfiguration",
&eprQuery, Msvm_VirtualSystemSettingData_WmiInfo) < 0)
return -1;
hypervAddEprParam(params, "AffectedConfiguration",
&eprQuery, Msvm_VirtualSystemSettingData_WmiInfo);
if (hypervAddEmbeddedParam(params, "ResourceSettings", &resourceSettings, wmiInfo) < 0) {
hypervFreeEmbeddedParam(resourceSettings);
+4 -4
View File
@@ -144,10 +144,10 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(hypervInvokeParamsList, hypervFreeInvokeParams);
void hypervAddSimpleParam(hypervInvokeParamsList *params, const char *name,
const char *value);
int hypervAddEprParam(hypervInvokeParamsList *params,
const char *name,
virBuffer *query,
hypervWmiClassInfo *eprInfo);
void hypervAddEprParam(hypervInvokeParamsList *params,
const char *name,
virBuffer *query,
hypervWmiClassInfo *eprInfo);
GHashTable *hypervCreateEmbeddedParam(hypervWmiClassInfo *info);