mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
hyperv: do not overwrite errors from hypervInvokeMethod()
Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
f1c406a9aa
commit
b1a06feed7
@ -1800,11 +1800,8 @@ hypervDomainSendKey(virDomainPtr domain, unsigned int codeset,
|
||||
if (hypervAddSimpleParam(params, "keyCode", keycodeStr) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (hypervInvokeMethod(priv, ¶ms, NULL) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, _("Could not press key %d"),
|
||||
translatedKeycodes[i]);
|
||||
if (hypervInvokeMethod(priv, ¶ms, NULL) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
/* simulate holdtime by sleeping */
|
||||
@ -1823,11 +1820,8 @@ hypervDomainSendKey(virDomainPtr domain, unsigned int codeset,
|
||||
if (hypervAddSimpleParam(params, "keyCode", keycodeStr) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (hypervInvokeMethod(priv, ¶ms, NULL) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Could not release key %s"), keycodeStr);
|
||||
if (hypervInvokeMethod(priv, ¶ms, NULL) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
result = 0;
|
||||
@ -1919,10 +1913,8 @@ hypervDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory,
|
||||
}
|
||||
}
|
||||
|
||||
if (hypervInvokeMethod(priv, ¶ms, NULL) < 0) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Could not set memory"));
|
||||
if (hypervInvokeMethod(priv, ¶ms, NULL) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
result = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user