提交 759bb211 编写于 作者: P Peter Krempa

util: error: Fix error message strings to play well with additional info

Additional information for an error message is either in form of a
string or empty. Fix two offenders. One used %d as the format modifier
and the second one  always expected a string.

Thankfully, neither of the offenders are currently in effect.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 590cc60d
......@@ -975,7 +975,10 @@ virErrorMsg(virErrorNumber error, const char *info)
errmsg = _("POST operation failed");
break;
case VIR_ERR_HTTP_ERROR:
errmsg = _("got unknown HTTP error code %d");
if (info != NULL)
errmsg = _("got unknown HTTP error code %s");
else
errmsg = _("got unknown HTTP error code");
break;
case VIR_ERR_UNKNOWN_HOST:
if (info != NULL)
......@@ -1002,7 +1005,10 @@ virErrorMsg(virErrorNumber error, const char *info)
errmsg = _("could not connect to Xen Store %s");
break;
case VIR_ERR_XEN_CALL:
errmsg = _("failed Xen syscall %s");
if (info == NULL)
errmsg = _("failed Xen syscall");
else
errmsg = _("failed Xen syscall %s");
break;
case VIR_ERR_OS_TYPE:
if (info == NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册