From: Daniel P. Berrange Date: Fri, 30 Nov 2012 18:43:40 +0000 (+0000) Subject: Allow duration=0 for virsh nodesuspend X-Git-Tag: v0.10.2.2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68fb799b46b2193a203cbb69f11f5f2ecba480e1;p=thirdparty%2Flibvirt.git Allow duration=0 for virsh nodesuspend 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 (cherry picked from commit 1cad5ebae6074318ca22789b1e38d4594d54f883) --- diff --git a/tools/virsh-host.c b/tools/virsh-host.c index 2c46336657..ab7155a382 100644 --- a/tools/virsh-host.c +++ b/tools/virsh-host.c @@ -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; }