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
This commit is contained in:
Ján Tomko 2015-12-03 13:44:43 +01:00
parent 45138725cf
commit b15e26f939

View File

@ -7116,10 +7116,8 @@ cmdIOThreadPin(vshControl *ctl, const vshCmd *cmd)
if (vshCommandOptUInt(ctl, cmd, "iothread", &iothread_id) < 0)
goto cleanup;
if (vshCommandOptString(ctl, cmd, "cpulist", &cpulist) < 0) {
vshError(ctl, "%s", _("iothreadpin: invalid cpulist."));
if (vshCommandOptStringReq(ctl, cmd, "cpulist", &cpulist) < 0)
goto cleanup;
}
if ((maxcpu = virshNodeGetCPUCount(priv->conn)) < 0)
goto cleanup;