[PATCH] Add error message to virsh setmem/setmaxmem

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

 



Hi

Virsh setmem/setmaxmem doesn't output an error message when an invalid
value is set to "bytes".

This patch outputs an error message, when an invalid value is set as
"bytes" of virsh setmem/setmaxmem. 


Signed-off-by: Masayuki Sunou <fj1826dm@xxxxxxxxxxxxxxxxx>

Thanks,
Masayuki Sunou.


Index: src/virsh.c
===================================================================
RCS file: /data/cvs/libvirt/src/virsh.c,v
retrieving revision 1.66
diff -u -p -r1.66 virsh.c
--- src/virsh.c	19 Mar 2007 14:20:30 -0000	1.66
+++ src/virsh.c	19 Mar 2007 23:29:14 -0000
@@ -1461,6 +1461,7 @@ cmdSetmem(vshControl * ctl, vshCmd * cmd
     bytes = vshCommandOptInt(cmd, "bytes", &bytes);
     if (bytes <= 0) {
         virDomainFree(dom);
+        vshError(ctl, FALSE, _("Invalid value of \"bytes\""));
         return FALSE;
     }
 
@@ -1504,6 +1505,7 @@ cmdSetmaxmem(vshControl * ctl, vshCmd * 
     bytes = vshCommandOptInt(cmd, "bytes", &bytes);
     if (bytes <= 0) {
         virDomainFree(dom);
+        vshError(ctl, FALSE, _("Invalid value of \"bytes\""));
         return FALSE;
     }
 


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