From: "Daniel P. Berrange" <berrange(a)redhat.com>
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(a)redhat.com>
---
tools/virsh-domain.c | 34 ++++++++++++++++++++--------------
tools/virsh-host.c | 2 +-
2 files changed, 21 insertions(+), 15 deletions(-)
Looks like you mixed two commits:
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 3ca246b..9f1a3d4 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -4030,8 +4030,8 @@ static const vshCmdOptDef opts_shutdown[] = {
static bool
cmdShutdown(vshControl *ctl, const vshCmd *cmd)
{
- virDomainPtr dom;
- bool ret = true;
+ virDomainPtr dom = NULL;
+ bool ret = false;
One for improving reboot/shutdown mode handling...
diff --git a/tools/virsh-host.c b/tools/virsh-host.c
index 3701f56..3d13e01 100644
--- a/tools/virsh-host.c
+++ b/tools/virsh-host.c
@@ -537,7 +537,7 @@ cmdNodeSuspend(vshControl *ctl, const vshCmd
*cmd)
return false;
}
- if (duration <= 0) {
+ if (duration < 0) {
...and the actual intended commit. ACK to just this hunk, and
save the rest for your mode handling improvements.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org