[PATCH] add error message for the case of the vcpupin command fails.

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

 



Hi,

I try follow,

    # virsh vcpupin guest_dom AAA 0,1
    [no error messages]
    # echo $?
    1

There is no processing to output an error-message,
when vshCommandOptInt become an error.

I make the patch to solve this problem.

Thanks,
Shigeki Sakamoto.


Index: src/virsh.c
===================================================================
RCS file: /data/cvs/libvirt/src/virsh.c,v
retrieving revision 1.134
diff -u -p -r1.134 virsh.c
--- src/virsh.c	27 Feb 2008 16:14:44 -0000	1.134
+++ src/virsh.c	4 Mar 2008 08:35:47 -0000
@@ -1723,6 +1723,8 @@ cmdVcpupin(vshControl * ctl, vshCmd * cm
 
     vcpu = vshCommandOptInt(cmd, "vcpu", &vcpufound);
     if (!vcpufound) {
+        vshCmdOpt *arg = vshCommandOpt(cmd, "vcpu");
+        vshError(ctl, FALSE, _("vcpu: %s: Invalid virtual CPU number."), arg->data);
         virDomainFree(dom);
         return FALSE;
     }

--
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]