]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virsh: remove custom error for cpulist from cmdIOThreadPin
authorJán Tomko <jtomko@redhat.com>
Thu, 3 Dec 2015 12:44:43 +0000 (13:44 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 3 Dec 2015 12:58:52 +0000 (13:58 +0100)
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

index 4d798902b53da407ae4dc078fffb7f04232a0378..b7e7606013ec16c8affe65663196e59cf30af24e 100644 (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;