[PATCH 2/3] virsh: remove custom error for cpulist from cmdIOThreadPin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]