提交 f0e7f90b 编写于 作者: P Pino Toscano 提交者: Peter Krempa

virerror: add error for libssh transport

Add a new error domain and number for a new libssh-based transport.
上级 0e9fec97
......@@ -131,6 +131,7 @@ typedef enum {
VIR_FROM_XENXL = 64, /* Error from Xen xl config code */
VIR_FROM_PERF = 65, /* Error from perf */
VIR_FROM_LIBSSH = 66, /* Error from libssh connection transport */
# ifdef VIR_ENUM_SENTINELS
VIR_ERR_DOMAIN_LAST
......@@ -317,6 +318,7 @@ typedef enum {
VIR_ERR_NO_CLIENT = 96, /* Client was not found */
VIR_ERR_AGENT_UNSYNCED = 97, /* guest agent replies with wrong id
to guest-sync command */
VIR_ERR_LIBSSH = 98, /* error in libssh transport driver */
} virErrorNumber;
/**
......
......@@ -137,7 +137,8 @@ VIR_ENUM_IMPL(virErrorDomain, VIR_ERR_DOMAIN_LAST,
"Log Manager",
"Xen XL Config",
"Perf",
"Perf", /* 65 */
"Libssh transport layer",
)
......@@ -1400,6 +1401,12 @@ virErrorMsg(virErrorNumber error, const char *info)
else
errmsg = _("guest agent replied with wrong id to guest-sync command: %s");
break;
case VIR_ERR_LIBSSH:
if (info == NULL)
errmsg = _("libssh transport error");
else
errmsg = _("libssh transport error: %s");
break;
}
return errmsg;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册