提交 8ff9f245 编写于 作者: S Shanzhi Yu 提交者: Ján Tomko

virsh: improve the error for wrong memtune parameters

When set guest memory with a invalid parameter of --soft-limit,
it posts weird error:

$ virsh memtune r7 --hard-limit 20417224 --soft-limit 9007199254740992 \
  --swap-hard-limit 35417224
error: Unable to parse integer parameter 'NAME

Change it to

error: Unable to parse integer parameter soft-limit

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1211550Signed-off-by: NShanzhi Yu <shyu@redhat.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 d3753687
......@@ -8417,7 +8417,7 @@ cmdMemtune(vshControl *ctl, const vshCmd *cmd)
#define PARSE_MEMTUNE_PARAM(NAME, FIELD) \
if ((rc = vshMemtuneGetSize(cmd, NAME, &tmpVal)) < 0) { \
vshError(ctl, "%s", _("Unable to parse integer parameter 'NAME'")); \
vshError(ctl, _("Unable to parse integer parameter %s"), NAME); \
goto cleanup; \
} \
if (rc == 1) { \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册