提交 8f1bfd8f 编写于 作者: P Peter Krempa

util: error: Add error message versions with info for some error codes

Few error codes were missing the version of the message with additional
info. In case of the modified messages it's not very likely they'll ever
report any additional data, but for the sake of consistency we should
provide them.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 759bb211
......@@ -924,7 +924,10 @@ virErrorMsg(virErrorNumber error, const char *info)
errmsg = _("internal error");
break;
case VIR_ERR_NO_MEMORY:
errmsg = _("out of memory");
if (info == NULL)
errmsg = _("out of memory");
else
errmsg = _("out of memory: %s");
break;
case VIR_ERR_NO_SUPPORT:
if (info == NULL)
......@@ -1017,7 +1020,10 @@ virErrorMsg(virErrorNumber error, const char *info)
errmsg = _("unknown OS type %s");
break;
case VIR_ERR_NO_KERNEL:
errmsg = _("missing kernel information");
if (info == NULL)
errmsg = _("missing kernel information");
else
errmsg = _("missing kernel information: %s");
break;
case VIR_ERR_NO_ROOT:
if (info == NULL)
......@@ -1470,7 +1476,10 @@ virErrorMsg(virErrorNumber error, const char *info)
errmsg = _("XML document failed to validate against schema: %s");
break;
case VIR_ERR_MIGRATE_FINISH_OK:
errmsg = _("migration successfully aborted");
if (info == NULL)
errmsg = _("migration successfully aborted");
else
errmsg = _("migration successfully aborted: %s");
break;
case VIR_ERR_NO_SERVER:
if (info == NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册