if ((timeout && virCondWaitUntil(&mon->notify, &mon->lock, then) < 0) ||
(!timeout && virCondWait(&mon->notify, &mon->lock) < 0)) {
if (errno == ETIMEDOUT) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ virReportError(VIR_ERR_AGENT_UNRESPONSIVE, "%s",
_("Guest agent not available for now"));
ret = -2;
} else {
if (useAgent) {
if (priv->agentError) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("QEMU guest agent is not available due to an error"));
+ virReportError(VIR_ERR_AGENT_UNRESPONSIVE, "%s",
+ _("QEMU guest agent is not "
+ "available due to an error"));
goto cleanup;
}
if (!priv->agent) {
if (useAgent) {
if (priv->agentError) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("QEMU guest agent is not available due to an error"));
+ virReportError(VIR_ERR_AGENT_UNRESPONSIVE, "%s",
+ _("QEMU guest agent is not "
+ "available due to an error"));
goto cleanup;
}
if (!priv->agent) {
int freezed;
if (priv->agentError) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ virReportError(VIR_ERR_AGENT_UNRESPONSIVE, "%s",
_("QEMU guest agent is not "
"available due to an error"));
return -1;
if (priv->agentError) {
if (report)
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ virReportError(VIR_ERR_AGENT_UNRESPONSIVE, "%s",
_("QEMU guest agent is not "
"available due to an error"));
return -1;
}
if (priv->agentError) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("QEMU guest agent is not available due to an error"));
+ virReportError(VIR_ERR_AGENT_UNRESPONSIVE, "%s",
+ _("QEMU guest agent is not "
+ "available due to an error"));
goto cleanup;
}
}
if (priv->agentError) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("QEMU guest agent is not available due to an error"));
+ virReportError(VIR_ERR_AGENT_UNRESPONSIVE, "%s",
+ _("QEMU guest agent is not "
+ "available due to an error"));
goto cleanup;
}