提交 62be5486 编写于 作者: M Martin Kletzander

virerror: Introduce new error type NO_SERVER

This serves the same purpose as VIR_ERR_NO_xxx where xxx is any object
that API can be called upon.  Only this particular one is used for
daemon's servers.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 fd4f278e
......@@ -311,6 +311,7 @@ typedef enum {
VIR_ERR_XML_INVALID_SCHEMA = 92, /* XML document doesn't validate against schema */
VIR_ERR_MIGRATE_FINISH_OK = 93, /* Finish API succeeded but it is expected to return NULL */
VIR_ERR_AUTH_UNAVAILABLE = 94, /* authentication unavailable */
VIR_ERR_NO_SERVER = 95, /* Server was not found */
} virErrorNumber;
/**
......
......@@ -1380,6 +1380,12 @@ virErrorMsg(virErrorNumber error, const char *info)
case VIR_ERR_MIGRATE_FINISH_OK:
errmsg = _("migration successfully aborted");
break;
case VIR_ERR_NO_SERVER:
if (info == NULL)
errmsg = _("Server not found");
else
errmsg = _("Server not found: %s");
break;
}
return errmsg;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册