]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Allow duration=0 for virsh nodesuspend
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 30 Nov 2012 18:43:40 +0000 (18:43 +0000)
committerCole Robinson <crobinso@redhat.com>
Sun, 9 Dec 2012 21:53:41 +0000 (16:53 -0500)
The virNodeSuspend API allows for a duration of 0, to mean no
timed wakup. virsh needlessly forbids this though

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 1cad5ebae6074318ca22789b1e38d4594d54f883)

tools/virsh-host.c

index 2c463366579227c2930fe8449c9972b71c34c16d..ab7155a38242ef6b87e7b61207bad4138dc01c71 100644 (file)
@@ -504,7 +504,7 @@ cmdNodeSuspend(vshControl *ctl, const vshCmd *cmd)
         return false;
     }
 
-    if (duration <= 0) {
+    if (duration < 0) {
         vshError(ctl, "%s", _("Invalid duration"));
         return false;
     }