hyperv: Reformat

This is mostly opening hyperv driver sources in vim, selecting
everything, hitting reformat and then fixing a very few places.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Matt Coleman <matt@datto.com>
This commit is contained in:
Michal Privoznik 2020-10-21 14:53:12 +02:00
parent e8fd9c91c2
commit c383dc948e
3 changed files with 185 additions and 183 deletions

View File

@ -932,8 +932,8 @@ hypervDomainResume(virDomainPtr domain)
goto cleanup; goto cleanup;
} }
result = hypervInvokeMsvmComputerSystemRequestStateChange result = hypervInvokeMsvmComputerSystemRequestStateChange(domain,
(domain, MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_ENABLED); MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_ENABLED);
cleanup: cleanup:
hypervFreeObject(priv, (hypervObject *)computerSystem); hypervFreeObject(priv, (hypervObject *)computerSystem);
@ -1051,8 +1051,8 @@ hypervDomainDestroyFlags(virDomainPtr domain, unsigned int flags)
goto cleanup; goto cleanup;
} }
result = hypervInvokeMsvmComputerSystemRequestStateChange result = hypervInvokeMsvmComputerSystemRequestStateChange(domain,
(domain, MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_DISABLED); MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_DISABLED);
cleanup: cleanup:
hypervFreeObject(priv, (hypervObject *)computerSystem); hypervFreeObject(priv, (hypervObject *)computerSystem);
@ -1103,14 +1103,14 @@ hypervDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
} }
if (hypervGetProcSDByVSSDInstanceId(priv, if (hypervGetProcSDByVSSDInstanceId(priv,
virtualSystemSettingData->data.common->InstanceID, virtualSystemSettingData->data.common->InstanceID,
&processorSettingData) < 0) { &processorSettingData) < 0) {
goto cleanup; goto cleanup;
} }
if (hypervGetMemSDByVSSDInstanceId(priv, if (hypervGetMemSDByVSSDInstanceId(priv,
virtualSystemSettingData->data.common->InstanceID, virtualSystemSettingData->data.common->InstanceID,
&memorySettingData) < 0) { &memorySettingData) < 0) {
goto cleanup; goto cleanup;
} }
@ -1189,14 +1189,14 @@ hypervDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
} }
if (hypervGetProcSDByVSSDInstanceId(priv, if (hypervGetProcSDByVSSDInstanceId(priv,
virtualSystemSettingData->data.common->InstanceID, virtualSystemSettingData->data.common->InstanceID,
&processorSettingData) < 0) { &processorSettingData) < 0) {
goto cleanup; goto cleanup;
} }
if (hypervGetMemSDByVSSDInstanceId(priv, if (hypervGetMemSDByVSSDInstanceId(priv,
virtualSystemSettingData->data.common->InstanceID, virtualSystemSettingData->data.common->InstanceID,
&memorySettingData) < 0) { &memorySettingData) < 0) {
goto cleanup; goto cleanup;
} }
@ -1358,8 +1358,8 @@ hypervDomainCreateWithFlags(virDomainPtr domain, unsigned int flags)
goto cleanup; goto cleanup;
} }
result = hypervInvokeMsvmComputerSystemRequestStateChange result = hypervInvokeMsvmComputerSystemRequestStateChange(domain,
(domain, MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_ENABLED); MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_ENABLED);
cleanup: cleanup:
hypervFreeObject(priv, (hypervObject *)computerSystem); hypervFreeObject(priv, (hypervObject *)computerSystem);
@ -1405,7 +1405,7 @@ hypervDomainGetAutostart(virDomainPtr domain, int *autostart)
result = 0; result = 0;
} }
cleanup: cleanup:
hypervFreeObject(priv, (hypervObject *) vsgsd); hypervFreeObject(priv, (hypervObject *) vsgsd);
hypervFreeObject(priv, (hypervObject *) vssd); hypervFreeObject(priv, (hypervObject *) vssd);
@ -1675,8 +1675,8 @@ hypervDomainManagedSaveRemove(virDomainPtr domain, unsigned int flags)
goto cleanup; goto cleanup;
} }
result = hypervInvokeMsvmComputerSystemRequestStateChange result = hypervInvokeMsvmComputerSystemRequestStateChange(domain,
(domain, MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_DISABLED); MSVM_COMPUTERSYSTEM_REQUESTEDSTATE_DISABLED);
cleanup: cleanup:
hypervFreeObject(priv, (hypervObject *)computerSystem); hypervFreeObject(priv, (hypervObject *)computerSystem);
@ -1816,8 +1816,8 @@ hypervConnectListAllDomains(virConnectPtr conn,
static int static int
hypervDomainSendKey(virDomainPtr domain, unsigned int codeset, hypervDomainSendKey(virDomainPtr domain, unsigned int codeset,
unsigned int holdtime, unsigned int *keycodes, int nkeycodes, unsigned int holdtime, unsigned int *keycodes, int nkeycodes,
unsigned int flags) unsigned int flags)
{ {
int result = -1; int result = -1;
size_t i = 0; size_t i = 0;
@ -1840,11 +1840,11 @@ hypervDomainSendKey(virDomainPtr domain, unsigned int codeset,
goto cleanup; goto cleanup;
virBufferEscapeSQL(&query, virBufferEscapeSQL(&query,
"associators of " "associators of "
"{Msvm_ComputerSystem.CreationClassName=\"Msvm_ComputerSystem\"," "{Msvm_ComputerSystem.CreationClassName=\"Msvm_ComputerSystem\","
"Name=\"%s\"} " "Name=\"%s\"} "
"where ResultClass = Msvm_Keyboard", "where ResultClass = Msvm_Keyboard",
uuid_string); uuid_string);
if (hypervGetWmiClass(Msvm_Keyboard, &keyboard) < 0) if (hypervGetWmiClass(Msvm_Keyboard, &keyboard) < 0)
goto cleanup; goto cleanup;
@ -1854,12 +1854,13 @@ hypervDomainSendKey(virDomainPtr domain, unsigned int codeset,
/* translate keycodes to win32 and generate keyup scancodes. */ /* translate keycodes to win32 and generate keyup scancodes. */
for (i = 0; i < nkeycodes; i++) { for (i = 0; i < nkeycodes; i++) {
if (codeset != VIR_KEYCODE_SET_WIN32) { if (codeset != VIR_KEYCODE_SET_WIN32) {
keycode = virKeycodeValueTranslate(codeset, VIR_KEYCODE_SET_WIN32, keycode = virKeycodeValueTranslate(codeset,
keycodes[i]); VIR_KEYCODE_SET_WIN32,
keycodes[i]);
if (keycode < 0) { if (keycode < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not translate keycode")); _("Could not translate keycode"));
goto cleanup; goto cleanup;
} }
translatedKeycodes[i] = keycode; translatedKeycodes[i] = keycode;
@ -1907,8 +1908,8 @@ hypervDomainSendKey(virDomainPtr domain, unsigned int codeset,
goto cleanup; goto cleanup;
if (hypervInvokeMethod(priv, &params, NULL) < 0) { if (hypervInvokeMethod(priv, &params, NULL) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not release key %s"), virReportError(VIR_ERR_INTERNAL_ERROR,
keycodeStr); _("Could not release key %s"), keycodeStr);
goto cleanup; goto cleanup;
} }
} }
@ -1926,7 +1927,7 @@ hypervDomainSendKey(virDomainPtr domain, unsigned int codeset,
static int static int
hypervDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory, hypervDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory,
unsigned int flags) unsigned int flags)
{ {
int result = -1; int result = -1;
char uuid_string[VIR_UUID_STRING_BUFLEN]; char uuid_string[VIR_UUID_STRING_BUFLEN];
@ -1949,7 +1950,7 @@ hypervDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory,
goto cleanup; goto cleanup;
if (hypervGetMsvmMemorySettingDataFromVSSD(priv, vssd->data.common->InstanceID, if (hypervGetMsvmMemorySettingDataFromVSSD(priv, vssd->data.common->InstanceID,
&memsd) < 0) &memsd) < 0)
goto cleanup; goto cleanup;
if (priv->wmiVersion == HYPERV_WMI_VERSION_V1) { if (priv->wmiVersion == HYPERV_WMI_VERSION_V1) {
@ -1964,7 +1965,7 @@ hypervDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory,
virBufferEscapeSQL(&eprQuery, "where Name = \"%s\"", uuid_string); virBufferEscapeSQL(&eprQuery, "where Name = \"%s\"", uuid_string);
if (hypervAddEprParam(params, "ComputerSystem", priv, &eprQuery, if (hypervAddEprParam(params, "ComputerSystem", priv, &eprQuery,
Msvm_ComputerSystem_WmiInfo) < 0) Msvm_ComputerSystem_WmiInfo) < 0)
goto cleanup; goto cleanup;
} else if (priv->wmiVersion == HYPERV_WMI_VERSION_V2) { } else if (priv->wmiVersion == HYPERV_WMI_VERSION_V2) {
params = hypervCreateInvokeParamsList(priv, "ModifyResourceSettings", params = hypervCreateInvokeParamsList(priv, "ModifyResourceSettings",
@ -1983,7 +1984,7 @@ hypervDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory,
goto cleanup; goto cleanup;
if (hypervSetEmbeddedProperty(memResource, "InstanceID", if (hypervSetEmbeddedProperty(memResource, "InstanceID",
memsd->data.common->InstanceID) < 0) { memsd->data.common->InstanceID) < 0) {
goto cleanup; goto cleanup;
} }
@ -2079,30 +2080,30 @@ hypervDebugHandler(const char *message, debug_level_e level,
void *user_data G_GNUC_UNUSED) void *user_data G_GNUC_UNUSED)
{ {
switch (level) { switch (level) {
case DEBUG_LEVEL_ERROR: case DEBUG_LEVEL_ERROR:
case DEBUG_LEVEL_CRITICAL: case DEBUG_LEVEL_CRITICAL:
case DEBUG_LEVEL_ALWAYS: case DEBUG_LEVEL_ALWAYS:
VIR_ERROR(_("openwsman: %s"), message); VIR_ERROR(_("openwsman: %s"), message);
break; break;
case DEBUG_LEVEL_WARNING: case DEBUG_LEVEL_WARNING:
VIR_WARN("openwsman: %s", message); VIR_WARN("openwsman: %s", message);
break; break;
case DEBUG_LEVEL_MESSAGE: case DEBUG_LEVEL_MESSAGE:
VIR_INFO("openwsman: %s", message); VIR_INFO("openwsman: %s", message);
break; break;
case DEBUG_LEVEL_INFO: case DEBUG_LEVEL_INFO:
VIR_INFO("openwsman: %s", message); VIR_INFO("openwsman: %s", message);
break; break;
case DEBUG_LEVEL_DEBUG: case DEBUG_LEVEL_DEBUG:
VIR_DEBUG("openwsman: %s", message); VIR_DEBUG("openwsman: %s", message);
break; break;
case DEBUG_LEVEL_NONE: case DEBUG_LEVEL_NONE:
default: default:
/* Ignore the rest */ /* Ignore the rest */
break; break;
} }

View File

@ -72,10 +72,10 @@ hypervGetWmiClassInfo(hypervPrivate *priv, hypervWmiClassInfoListPtr list,
version = "v1"; version = "v1";
for (i = 0; i < list->count; i++) { for (i = 0; i < list->count; i++) {
if (STRCASEEQ(list->objs[i]->version, version)) { if (STRCASEEQ(list->objs[i]->version, version)) {
*info = list->objs[i]; *info = list->objs[i];
return 0; return 0;
} }
} }
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
@ -172,7 +172,7 @@ hypervVerifyResponse(WsManClient *client, WsXmlDocH response,
*/ */
hypervInvokeParamsListPtr hypervInvokeParamsListPtr
hypervCreateInvokeParamsList(hypervPrivate *priv, const char *method, hypervCreateInvokeParamsList(hypervPrivate *priv, const char *method,
const char *selector, hypervWmiClassInfoListPtr obj) const char *selector, hypervWmiClassInfoListPtr obj)
{ {
hypervInvokeParamsListPtr params = NULL; hypervInvokeParamsListPtr params = NULL;
hypervWmiClassInfoPtr info = NULL; hypervWmiClassInfoPtr info = NULL;
@ -213,17 +213,17 @@ hypervFreeInvokeParams(hypervInvokeParamsListPtr params)
p = &(params->params[i]); p = &(params->params[i]);
switch (p->type) { switch (p->type) {
case HYPERV_SIMPLE_PARAM: case HYPERV_SIMPLE_PARAM:
break; break;
case HYPERV_EPR_PARAM: case HYPERV_EPR_PARAM:
virBufferFreeAndReset(p->epr.query); virBufferFreeAndReset(p->epr.query);
break; break;
case HYPERV_EMBEDDED_PARAM: case HYPERV_EMBEDDED_PARAM:
hypervFreeEmbeddedParam(p->embedded.table); hypervFreeEmbeddedParam(p->embedded.table);
break; break;
default: default:
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Invalid parameter type passed to free")); _("Invalid parameter type passed to free"));
} }
} }
@ -257,7 +257,7 @@ hypervCheckParams(hypervInvokeParamsListPtr params)
*/ */
int int
hypervAddSimpleParam(hypervInvokeParamsListPtr params, const char *name, hypervAddSimpleParam(hypervInvokeParamsListPtr params, const char *name,
const char *value) const char *value)
{ {
hypervParamPtr p = NULL; hypervParamPtr p = NULL;
@ -288,14 +288,14 @@ hypervAddSimpleParam(hypervInvokeParamsListPtr params, const char *name,
*/ */
int int
hypervAddEprParam(hypervInvokeParamsListPtr params, const char *name, hypervAddEprParam(hypervInvokeParamsListPtr params, const char *name,
hypervPrivate *priv, virBufferPtr query, hypervPrivate *priv, virBufferPtr query,
hypervWmiClassInfoListPtr eprInfo) hypervWmiClassInfoListPtr eprInfo)
{ {
hypervParamPtr p = NULL; hypervParamPtr p = NULL;
hypervWmiClassInfoPtr classInfo = NULL; hypervWmiClassInfoPtr classInfo = NULL;
if (hypervGetWmiClassInfo(priv, eprInfo, &classInfo) < 0 || if (hypervGetWmiClassInfo(priv, eprInfo, &classInfo) < 0 ||
hypervCheckParams(params) < 0) hypervCheckParams(params) < 0)
return -1; return -1;
p = &params->params[params->nbParams]; p = &params->params[params->nbParams];
@ -437,7 +437,7 @@ hypervFreeEmbeddedParam(virHashTablePtr p)
*/ */
static int static int
hypervGetCimTypeInfo(hypervCimTypePtr typemap, const char *name, hypervGetCimTypeInfo(hypervCimTypePtr typemap, const char *name,
hypervCimTypePtr *property) hypervCimTypePtr *property)
{ {
size_t i = 0; size_t i = 0;
while (typemap[i].name[0] != '\0') { while (typemap[i].name[0] != '\0') {
@ -464,14 +464,14 @@ hypervCreateInvokeXmlDoc(hypervInvokeParamsListPtr params, WsXmlDocH *docRoot)
*docRoot = ws_xml_create_doc(NULL, method); *docRoot = ws_xml_create_doc(NULL, method);
if (*docRoot == NULL) { if (*docRoot == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not instantiate XML document")); _("Could not instantiate XML document"));
goto cleanup; goto cleanup;
} }
xmlNodeMethod = xml_parser_get_root(*docRoot); xmlNodeMethod = xml_parser_get_root(*docRoot);
if (xmlNodeMethod == NULL) { if (xmlNodeMethod == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not get root node of XML document")); _("Could not get root node of XML document"));
goto cleanup; goto cleanup;
} }
@ -492,15 +492,15 @@ hypervCreateInvokeXmlDoc(hypervInvokeParamsListPtr params, WsXmlDocH *docRoot)
static int static int
hypervSerializeSimpleParam(hypervParamPtr p, const char *resourceUri, hypervSerializeSimpleParam(hypervParamPtr p, const char *resourceUri,
WsXmlNodeH *methodNode) WsXmlNodeH *methodNode)
{ {
WsXmlNodeH xmlNodeParam = NULL; WsXmlNodeH xmlNodeParam = NULL;
xmlNodeParam = ws_xml_add_child(*methodNode, resourceUri, xmlNodeParam = ws_xml_add_child(*methodNode, resourceUri,
p->simple.name, p->simple.value); p->simple.name, p->simple.value);
if (xmlNodeParam == NULL) { if (xmlNodeParam == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not create simple param")); _("Could not create simple param"));
return -1; return -1;
} }
@ -510,7 +510,7 @@ hypervSerializeSimpleParam(hypervParamPtr p, const char *resourceUri,
static int static int
hypervSerializeEprParam(hypervParamPtr p, hypervPrivate *priv, hypervSerializeEprParam(hypervParamPtr p, hypervPrivate *priv,
const char *resourceUri, WsXmlNodeH *methodNode) const char *resourceUri, WsXmlNodeH *methodNode)
{ {
int result = -1; int result = -1;
WsXmlNodeH xmlNodeParam = NULL, WsXmlNodeH xmlNodeParam = NULL,
@ -542,7 +542,7 @@ hypervSerializeEprParam(hypervParamPtr p, hypervPrivate *priv,
/* enumerate based on the filter from this query */ /* enumerate based on the filter from this query */
xmlDocResponse = wsmc_action_enumerate(priv->client, p->epr.info->rootUri, xmlDocResponse = wsmc_action_enumerate(priv->client, p->epr.info->rootUri,
options, filter); options, filter);
if (hypervVerifyResponse(priv->client, xmlDocResponse, "enumeration") < 0) if (hypervVerifyResponse(priv->client, xmlDocResponse, "enumeration") < 0)
goto cleanup; goto cleanup;
@ -552,7 +552,7 @@ hypervSerializeEprParam(hypervParamPtr p, hypervPrivate *priv,
/* Pull using filter and enum context */ /* Pull using filter and enum context */
xmlDocResponse = wsmc_action_pull(priv->client, resourceUri, options, xmlDocResponse = wsmc_action_pull(priv->client, resourceUri, options,
filter, enumContext); filter, enumContext);
if (hypervVerifyResponse(priv->client, xmlDocResponse, "pull") < 0) if (hypervVerifyResponse(priv->client, xmlDocResponse, "pull") < 0)
goto cleanup; goto cleanup;
@ -564,7 +564,7 @@ hypervSerializeEprParam(hypervParamPtr p, hypervPrivate *priv,
} }
if (!(xmlNodeTemp = ws_xml_get_child(xmlNodeTemp, 0, XML_NS_ENUMERATION, if (!(xmlNodeTemp = ws_xml_get_child(xmlNodeTemp, 0, XML_NS_ENUMERATION,
WSENUM_PULL_RESP))) { WSENUM_PULL_RESP))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not get response")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not get response"));
goto cleanup; goto cleanup;
} }
@ -580,37 +580,37 @@ hypervSerializeEprParam(hypervParamPtr p, hypervPrivate *priv,
} }
if (!(xmlNodeAddr = ws_xml_get_child(xmlNodeTemp, 0, XML_NS_ADDRESSING, if (!(xmlNodeAddr = ws_xml_get_child(xmlNodeTemp, 0, XML_NS_ADDRESSING,
WSA_ADDRESS))) { WSA_ADDRESS))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not get EPR address")); virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not get EPR address"));
goto cleanup; goto cleanup;
} }
if (!(xmlNodeRef = ws_xml_get_child(xmlNodeTemp, 0, XML_NS_ADDRESSING, if (!(xmlNodeRef = ws_xml_get_child(xmlNodeTemp, 0, XML_NS_ADDRESSING,
WSA_REFERENCE_PARAMETERS))) { WSA_REFERENCE_PARAMETERS))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not lookup EPR item reference parameters")); _("Could not lookup EPR item reference parameters"));
goto cleanup; goto cleanup;
} }
/* now build a new xml doc with the EPR node children */ /* now build a new xml doc with the EPR node children */
if (!(xmlNodeParam = ws_xml_add_child(*methodNode, resourceUri, if (!(xmlNodeParam = ws_xml_add_child(*methodNode, resourceUri,
p->epr.name, NULL))) { p->epr.name, NULL))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not add child node to methodNode")); _("Could not add child node to methodNode"));
goto cleanup; goto cleanup;
} }
if (!(ns = ws_xml_ns_add(xmlNodeParam, if (!(ns = ws_xml_ns_add(xmlNodeParam,
"http://schemas.xmlsoap.org/ws/2004/08/addressing", "a"))) { "http://schemas.xmlsoap.org/ws/2004/08/addressing", "a"))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not set namespace address for xmlNodeParam")); _("Could not set namespace address for xmlNodeParam"));
goto cleanup; goto cleanup;
} }
if (!(ns = ws_xml_ns_add(xmlNodeParam, if (!(ns = ws_xml_ns_add(xmlNodeParam,
"http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", "w"))) { "http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd", "w"))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not set wsman namespace address for xmlNodeParam")); _("Could not set wsman namespace address for xmlNodeParam"));
goto cleanup; goto cleanup;
} }
@ -634,7 +634,7 @@ hypervSerializeEprParam(hypervParamPtr p, hypervPrivate *priv,
static int static int
hypervSerializeEmbeddedParam(hypervParamPtr p, const char *resourceUri, hypervSerializeEmbeddedParam(hypervParamPtr p, const char *resourceUri,
WsXmlNodeH *methodNode) WsXmlNodeH *methodNode)
{ {
int result = -1; int result = -1;
WsXmlNodeH xmlNodeInstance = NULL, WsXmlNodeH xmlNodeInstance = NULL,
@ -652,9 +652,9 @@ hypervSerializeEmbeddedParam(hypervParamPtr p, const char *resourceUri,
int len = 0, i = 0; int len = 0, i = 0;
if (!(xmlNodeParam = ws_xml_add_child(*methodNode, resourceUri, p->embedded.name, if (!(xmlNodeParam = ws_xml_add_child(*methodNode, resourceUri, p->embedded.name,
NULL))) { NULL))) {
virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not add child node %s"), virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not add child node %s"),
p->embedded.name); p->embedded.name);
goto cleanup; goto cleanup;
} }
@ -663,21 +663,21 @@ hypervSerializeEmbeddedParam(hypervParamPtr p, const char *resourceUri,
/* start with the INSTANCE node */ /* start with the INSTANCE node */
if (!(xmlDocTemp = ws_xml_create_doc(NULL, "INSTANCE"))) { if (!(xmlDocTemp = ws_xml_create_doc(NULL, "INSTANCE"))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not create temporary xml doc")); _("Could not create temporary xml doc"));
goto cleanup; goto cleanup;
} }
if (!(xmlNodeInstance = xml_parser_get_root(xmlDocTemp))) { if (!(xmlNodeInstance = xml_parser_get_root(xmlDocTemp))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not get temp xml doc root")); _("Could not get temp xml doc root"));
goto cleanup; goto cleanup;
} }
/* add CLASSNAME node to INSTANCE node */ /* add CLASSNAME node to INSTANCE node */
if (!(ws_xml_add_node_attr(xmlNodeInstance, NULL, "CLASSNAME", if (!(ws_xml_add_node_attr(xmlNodeInstance, NULL, "CLASSNAME",
classInfo->name))) { classInfo->name))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not add attribute to node")); _("Could not add attribute to node"));
goto cleanup; goto cleanup;
} }
@ -686,7 +686,7 @@ hypervSerializeEmbeddedParam(hypervParamPtr p, const char *resourceUri,
items = virHashGetItems(p->embedded.table, NULL); items = virHashGetItems(p->embedded.table, NULL);
if (!items) { if (!items) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not read embedded param hash table")); _("Could not read embedded param hash table"));
goto cleanup; goto cleanup;
} }
@ -697,47 +697,47 @@ hypervSerializeEmbeddedParam(hypervParamPtr p, const char *resourceUri,
if (value != NULL) { if (value != NULL) {
if (hypervGetCimTypeInfo(classInfo->propertyInfo, name, if (hypervGetCimTypeInfo(classInfo->propertyInfo, name,
&property) < 0) { &property) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not read type information")); _("Could not read type information"));
goto cleanup; goto cleanup;
} }
if (!(xmlNodeProperty = ws_xml_add_child(xmlNodeInstance, NULL, if (!(xmlNodeProperty = ws_xml_add_child(xmlNodeInstance, NULL,
property->isArray ? "PROPERTY.ARRAY" : "PROPERTY", property->isArray ? "PROPERTY.ARRAY" : "PROPERTY",
NULL))) { NULL))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not add child to XML node")); _("Could not add child to XML node"));
goto cleanup; goto cleanup;
} }
if (!(ws_xml_add_node_attr(xmlNodeProperty, NULL, "NAME", name))) { if (!(ws_xml_add_node_attr(xmlNodeProperty, NULL, "NAME", name))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not add attribute to XML node")); _("Could not add attribute to XML node"));
goto cleanup; goto cleanup;
} }
if (!(ws_xml_add_node_attr(xmlNodeProperty, NULL, "TYPE", property->type))) { if (!(ws_xml_add_node_attr(xmlNodeProperty, NULL, "TYPE", property->type))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not add attribute to XML node")); _("Could not add attribute to XML node"));
goto cleanup; goto cleanup;
} }
/* If this attribute is an array, add VALUE.ARRAY node */ /* If this attribute is an array, add VALUE.ARRAY node */
if (property->isArray) { if (property->isArray) {
if (!(xmlNodeArray = ws_xml_add_child(xmlNodeProperty, NULL, if (!(xmlNodeArray = ws_xml_add_child(xmlNodeProperty, NULL,
"VALUE.ARRAY", NULL))) { "VALUE.ARRAY", NULL))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not add child to XML node")); _("Could not add child to XML node"));
goto cleanup; goto cleanup;
} }
} }
/* add the child */ /* add the child */
if (!(ws_xml_add_child(property->isArray ? xmlNodeArray : xmlNodeProperty, if (!(ws_xml_add_child(property->isArray ? xmlNodeArray : xmlNodeProperty,
NULL, "VALUE", value))) { NULL, "VALUE", value))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not add child to XML node")); _("Could not add child to XML node"));
goto cleanup; goto cleanup;
} }
@ -750,9 +750,9 @@ hypervSerializeEmbeddedParam(hypervParamPtr p, const char *resourceUri,
ws_xml_dump_memory_node_tree(xmlNodeInstance, &cdataContent, &len); ws_xml_dump_memory_node_tree(xmlNodeInstance, &cdataContent, &len);
if (!(xmlNodeCdata = xmlNewCDataBlock((xmlDocPtr) xmlDocCdata, if (!(xmlNodeCdata = xmlNewCDataBlock((xmlDocPtr) xmlDocCdata,
(xmlChar *)cdataContent, len))) { (xmlChar *)cdataContent, len))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not create CDATA element")); _("Could not create CDATA element"));
goto cleanup; goto cleanup;
} }
@ -764,7 +764,7 @@ hypervSerializeEmbeddedParam(hypervParamPtr p, const char *resourceUri,
*/ */
if (!(xmlAddChild((xmlNodePtr)(void *)xmlNodeParam, xmlNodeCdata))) { if (!(xmlAddChild((xmlNodePtr)(void *)xmlNodeParam, xmlNodeCdata))) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not add CDATA to doc root")); _("Could not add CDATA to doc root"));
goto cleanup; goto cleanup;
} }
@ -1177,73 +1177,73 @@ const char *
hypervReturnCodeToString(int returnCode) hypervReturnCodeToString(int returnCode)
{ {
switch (returnCode) { switch (returnCode) {
case CIM_RETURNCODE_COMPLETED_WITH_NO_ERROR: case CIM_RETURNCODE_COMPLETED_WITH_NO_ERROR:
return _("Completed with no error"); return _("Completed with no error");
case CIM_RETURNCODE_NOT_SUPPORTED: case CIM_RETURNCODE_NOT_SUPPORTED:
return _("Not supported"); return _("Not supported");
case CIM_RETURNCODE_UNKNOWN_ERROR: case CIM_RETURNCODE_UNKNOWN_ERROR:
return _("Unknown error"); return _("Unknown error");
case CIM_RETURNCODE_CANNOT_COMPLETE_WITHIN_TIMEOUT_PERIOD: case CIM_RETURNCODE_CANNOT_COMPLETE_WITHIN_TIMEOUT_PERIOD:
return _("Cannot complete within timeout period"); return _("Cannot complete within timeout period");
case CIM_RETURNCODE_FAILED: case CIM_RETURNCODE_FAILED:
return _("Failed"); return _("Failed");
case CIM_RETURNCODE_INVALID_PARAMETER: case CIM_RETURNCODE_INVALID_PARAMETER:
return _("Invalid parameter"); return _("Invalid parameter");
case CIM_RETURNCODE_IN_USE: case CIM_RETURNCODE_IN_USE:
return _("In use"); return _("In use");
case CIM_RETURNCODE_TRANSITION_STARTED: case CIM_RETURNCODE_TRANSITION_STARTED:
return _("Transition started"); return _("Transition started");
case CIM_RETURNCODE_INVALID_STATE_TRANSITION: case CIM_RETURNCODE_INVALID_STATE_TRANSITION:
return _("Invalid state transition"); return _("Invalid state transition");
case CIM_RETURNCODE_TIMEOUT_PARAMETER_NOT_SUPPORTED: case CIM_RETURNCODE_TIMEOUT_PARAMETER_NOT_SUPPORTED:
return _("Timeout parameter not supported"); return _("Timeout parameter not supported");
case CIM_RETURNCODE_BUSY: case CIM_RETURNCODE_BUSY:
return _("Busy"); return _("Busy");
case MSVM_RETURNCODE_FAILED: case MSVM_RETURNCODE_FAILED:
return _("Failed"); return _("Failed");
case MSVM_RETURNCODE_ACCESS_DENIED: case MSVM_RETURNCODE_ACCESS_DENIED:
return _("Access denied"); return _("Access denied");
case MSVM_RETURNCODE_NOT_SUPPORTED: case MSVM_RETURNCODE_NOT_SUPPORTED:
return _("Not supported"); return _("Not supported");
case MSVM_RETURNCODE_STATUS_IS_UNKNOWN: case MSVM_RETURNCODE_STATUS_IS_UNKNOWN:
return _("Status is unknown"); return _("Status is unknown");
case MSVM_RETURNCODE_TIMEOUT: case MSVM_RETURNCODE_TIMEOUT:
return _("Timeout"); return _("Timeout");
case MSVM_RETURNCODE_INVALID_PARAMETER: case MSVM_RETURNCODE_INVALID_PARAMETER:
return _("Invalid parameter"); return _("Invalid parameter");
case MSVM_RETURNCODE_SYSTEM_IS_IN_USE: case MSVM_RETURNCODE_SYSTEM_IS_IN_USE:
return _("System is in use"); return _("System is in use");
case MSVM_RETURNCODE_INVALID_STATE_FOR_THIS_OPERATION: case MSVM_RETURNCODE_INVALID_STATE_FOR_THIS_OPERATION:
return _("Invalid state for this operation"); return _("Invalid state for this operation");
case MSVM_RETURNCODE_INCORRECT_DATA_TYPE: case MSVM_RETURNCODE_INCORRECT_DATA_TYPE:
return _("Incorrect data type"); return _("Incorrect data type");
case MSVM_RETURNCODE_SYSTEM_IS_NOT_AVAILABLE: case MSVM_RETURNCODE_SYSTEM_IS_NOT_AVAILABLE:
return _("System is not available"); return _("System is not available");
case MSVM_RETURNCODE_OUT_OF_MEMORY: case MSVM_RETURNCODE_OUT_OF_MEMORY:
return _("Out of memory"); return _("Out of memory");
default: default:
return _("Unknown return code"); return _("Unknown return code");
} }
} }
@ -1343,30 +1343,30 @@ hypervInvokeMsvmComputerSystemRequestStateChange(virDomainPtr domain,
} }
switch (concreteJob->data.common->JobState) { switch (concreteJob->data.common->JobState) {
case MSVM_CONCRETEJOB_JOBSTATE_NEW: case MSVM_CONCRETEJOB_JOBSTATE_NEW:
case MSVM_CONCRETEJOB_JOBSTATE_STARTING: case MSVM_CONCRETEJOB_JOBSTATE_STARTING:
case MSVM_CONCRETEJOB_JOBSTATE_RUNNING: case MSVM_CONCRETEJOB_JOBSTATE_RUNNING:
case MSVM_CONCRETEJOB_JOBSTATE_SHUTTING_DOWN: case MSVM_CONCRETEJOB_JOBSTATE_SHUTTING_DOWN:
hypervFreeObject(priv, (hypervObject *)concreteJob); hypervFreeObject(priv, (hypervObject *)concreteJob);
concreteJob = NULL; concreteJob = NULL;
g_usleep(100 * 1000); g_usleep(100 * 1000);
continue; continue;
case MSVM_CONCRETEJOB_JOBSTATE_COMPLETED: case MSVM_CONCRETEJOB_JOBSTATE_COMPLETED:
completed = true; completed = true;
break; break;
case MSVM_CONCRETEJOB_JOBSTATE_TERMINATED: case MSVM_CONCRETEJOB_JOBSTATE_TERMINATED:
case MSVM_CONCRETEJOB_JOBSTATE_KILLED: case MSVM_CONCRETEJOB_JOBSTATE_KILLED:
case MSVM_CONCRETEJOB_JOBSTATE_EXCEPTION: case MSVM_CONCRETEJOB_JOBSTATE_EXCEPTION:
case MSVM_CONCRETEJOB_JOBSTATE_SERVICE: case MSVM_CONCRETEJOB_JOBSTATE_SERVICE:
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Concrete job for %s invocation is in error state"), _("Concrete job for %s invocation is in error state"),
"RequestStateChange"); "RequestStateChange");
goto cleanup; goto cleanup;
default: default:
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("Concrete job for %s invocation is in unknown state"), _("Concrete job for %s invocation is in unknown state"),
"RequestStateChange"); "RequestStateChange");
@ -1400,37 +1400,37 @@ hypervInvokeMsvmComputerSystemRequestStateChange(virDomainPtr domain,
int int
hypervMsvmComputerSystemEnabledStateToDomainState hypervMsvmComputerSystemEnabledStateToDomainState
(Msvm_ComputerSystem *computerSystem) (Msvm_ComputerSystem *computerSystem)
{ {
switch (computerSystem->data.common->EnabledState) { switch (computerSystem->data.common->EnabledState) {
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_UNKNOWN: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_UNKNOWN:
return VIR_DOMAIN_NOSTATE; return VIR_DOMAIN_NOSTATE;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_ENABLED: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_ENABLED:
return VIR_DOMAIN_RUNNING; return VIR_DOMAIN_RUNNING;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_DISABLED: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_DISABLED:
return VIR_DOMAIN_SHUTOFF; return VIR_DOMAIN_SHUTOFF;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_PAUSED: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_PAUSED:
return VIR_DOMAIN_PAUSED; return VIR_DOMAIN_PAUSED;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SUSPENDED: /* managed save */ case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SUSPENDED: /* managed save */
return VIR_DOMAIN_SHUTOFF; return VIR_DOMAIN_SHUTOFF;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_STARTING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_STARTING:
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SNAPSHOTTING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SNAPSHOTTING:
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SAVING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SAVING:
return VIR_DOMAIN_RUNNING; return VIR_DOMAIN_RUNNING;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_STOPPING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_STOPPING:
return VIR_DOMAIN_SHUTDOWN; return VIR_DOMAIN_SHUTDOWN;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_PAUSING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_PAUSING:
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_RESUMING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_RESUMING:
return VIR_DOMAIN_RUNNING; return VIR_DOMAIN_RUNNING;
default: default:
return VIR_DOMAIN_NOSTATE; return VIR_DOMAIN_NOSTATE;
} }
} }
@ -1444,33 +1444,33 @@ hypervIsMsvmComputerSystemActive(Msvm_ComputerSystem *computerSystem,
*in_transition = false; *in_transition = false;
switch (computerSystem->data.common->EnabledState) { switch (computerSystem->data.common->EnabledState) {
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_UNKNOWN: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_UNKNOWN:
return false; return false;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_ENABLED: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_ENABLED:
return true; return true;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_DISABLED: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_DISABLED:
return false; return false;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_PAUSED: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_PAUSED:
return true; return true;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SUSPENDED: /* managed save */ case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SUSPENDED: /* managed save */
return false; return false;
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_STARTING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_STARTING:
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SNAPSHOTTING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SNAPSHOTTING:
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SAVING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_SAVING:
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_STOPPING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_STOPPING:
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_PAUSING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_PAUSING:
case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_RESUMING: case MSVM_COMPUTERSYSTEM_ENABLEDSTATE_RESUMING:
if (in_transition != NULL) if (in_transition != NULL)
*in_transition = true; *in_transition = true;
return true; return true;
default: default:
return false; return false;
} }
} }
@ -1545,20 +1545,20 @@ hypervMsvmComputerSystemFromDomain(virDomainPtr domain,
int int
hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv, hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv,
const char *uuid_string, Msvm_VirtualSystemSettingData **list) const char *uuid_string, Msvm_VirtualSystemSettingData **list)
{ {
g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER; g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER;
virBufferAsprintf(&query, virBufferAsprintf(&query,
"associators of " "associators of "
"{Msvm_ComputerSystem.CreationClassName=\"Msvm_ComputerSystem\"," "{Msvm_ComputerSystem.CreationClassName=\"Msvm_ComputerSystem\","
"Name=\"%s\"} " "Name=\"%s\"} "
"where AssocClass = Msvm_SettingsDefineState " "where AssocClass = Msvm_SettingsDefineState "
"ResultClass = Msvm_VirtualSystemSettingData", "ResultClass = Msvm_VirtualSystemSettingData",
uuid_string); uuid_string);
if (hypervGetWmiClassList(priv, Msvm_VirtualSystemSettingData_WmiInfo, &query, if (hypervGetWmiClassList(priv, Msvm_VirtualSystemSettingData_WmiInfo, &query,
(hypervObject **)list) < 0 || *list == NULL) (hypervObject **)list) < 0 || *list == NULL)
return -1; return -1;
return 0; return 0;
@ -1571,19 +1571,19 @@ hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv,
int int
hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv, hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv,
const char *vssd_instanceid, Msvm_MemorySettingData **list) const char *vssd_instanceid, Msvm_MemorySettingData **list)
{ {
g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER; g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER;
virBufferAsprintf(&query, virBufferAsprintf(&query,
"associators of " "associators of "
"{Msvm_VirtualSystemSettingData.InstanceID=\"%s\"} " "{Msvm_VirtualSystemSettingData.InstanceID=\"%s\"} "
"where AssocClass = Msvm_VirtualSystemSettingDataComponent " "where AssocClass = Msvm_VirtualSystemSettingDataComponent "
"ResultClass = Msvm_MemorySettingData", "ResultClass = Msvm_MemorySettingData",
vssd_instanceid); vssd_instanceid);
if (hypervGetWmiClassList(priv, Msvm_MemorySettingData_WmiInfo, &query, if (hypervGetWmiClassList(priv, Msvm_MemorySettingData_WmiInfo, &query,
(hypervObject **)list) < 0 || *list == NULL) (hypervObject **)list) < 0 || *list == NULL)
return -1; return -1;
return 0; return 0;

View File

@ -132,20 +132,22 @@ typedef hypervInvokeParamsList *hypervInvokeParamsListPtr;
hypervInvokeParamsListPtr hypervCreateInvokeParamsList(hypervPrivate *priv, hypervInvokeParamsListPtr hypervCreateInvokeParamsList(hypervPrivate *priv,
const char *method, const char *selector, hypervWmiClassInfoListPtr obj); const char *method,
const char *selector,
hypervWmiClassInfoListPtr obj);
void hypervFreeInvokeParams(hypervInvokeParamsListPtr params); void hypervFreeInvokeParams(hypervInvokeParamsListPtr params);
G_DEFINE_AUTOPTR_CLEANUP_FUNC(hypervInvokeParamsList, hypervFreeInvokeParams); G_DEFINE_AUTOPTR_CLEANUP_FUNC(hypervInvokeParamsList, hypervFreeInvokeParams);
int hypervAddSimpleParam(hypervInvokeParamsListPtr params, const char *name, int hypervAddSimpleParam(hypervInvokeParamsListPtr params, const char *name,
const char *value); const char *value);
int hypervAddEprParam(hypervInvokeParamsListPtr params, const char *name, int hypervAddEprParam(hypervInvokeParamsListPtr params, const char *name,
hypervPrivate *priv, virBufferPtr query, hypervPrivate *priv, virBufferPtr query,
hypervWmiClassInfoListPtr eprInfo); hypervWmiClassInfoListPtr eprInfo);
virHashTablePtr hypervCreateEmbeddedParam(hypervPrivate *priv, virHashTablePtr hypervCreateEmbeddedParam(hypervPrivate *priv,
hypervWmiClassInfoListPtr info); hypervWmiClassInfoListPtr info);
int hypervSetEmbeddedProperty(virHashTablePtr table, int hypervSetEmbeddedProperty(virHashTablePtr table,
const char *name, const char *name,
@ -222,8 +224,7 @@ int hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv,
int hypervInvokeMsvmComputerSystemRequestStateChange(virDomainPtr domain, int hypervInvokeMsvmComputerSystemRequestStateChange(virDomainPtr domain,
int requestedState); int requestedState);
int hypervMsvmComputerSystemEnabledStateToDomainState int hypervMsvmComputerSystemEnabledStateToDomainState(Msvm_ComputerSystem *computerSystem);
(Msvm_ComputerSystem *computerSystem);
bool hypervIsMsvmComputerSystemActive(Msvm_ComputerSystem *computerSystem, bool hypervIsMsvmComputerSystemActive(Msvm_ComputerSystem *computerSystem,
bool *in_transition); bool *in_transition);