提交 b15e26f9 编写于 作者: J Ján Tomko

virsh: remove custom error for cpulist from cmdIOThreadPin

Instead of the custom error:
error: iothreadpin: invalid cpulist.

use vshCommandOptStringReq and let it report a more specific error:
error: Failed to get option 'cpulist': Option argument is empty
上级 45138725
...@@ -7116,10 +7116,8 @@ cmdIOThreadPin(vshControl *ctl, const vshCmd *cmd) ...@@ -7116,10 +7116,8 @@ cmdIOThreadPin(vshControl *ctl, const vshCmd *cmd)
if (vshCommandOptUInt(ctl, cmd, "iothread", &iothread_id) < 0) if (vshCommandOptUInt(ctl, cmd, "iothread", &iothread_id) < 0)
goto cleanup; goto cleanup;
if (vshCommandOptString(ctl, cmd, "cpulist", &cpulist) < 0) { if (vshCommandOptStringReq(ctl, cmd, "cpulist", &cpulist) < 0)
vshError(ctl, "%s", _("iothreadpin: invalid cpulist."));
goto cleanup; goto cleanup;
}
if ((maxcpu = virshNodeGetCPUCount(priv->conn)) < 0) if ((maxcpu = virshNodeGetCPUCount(priv->conn)) < 0)
goto cleanup; goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册