From b15e26f9395407bc779bc18c5d74f3ed97673ad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Thu, 3 Dec 2015 13:44:43 +0100 Subject: [PATCH] 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 --- 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 4d798902b5..b7e7606013 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;