Re: [PATCH] Allow duration=0 for virsh nodesuspend

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

 



> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

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