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 --- tools/virsh-domain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 4d79890..b7e7606 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -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; -- 2.4.6 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list