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

Re: [libvirt] [PATCH v2 3/5] Introduce virDomainSuspendForDuration API



On Thu, Jan 26, 2012 at 08:59:45PM +0100, Michal Privoznik wrote:
> This API allows a domain to be put into one of S# ACPI states.
> Currently, S3 and S4 are supported. These states are shared
> with virNodeSuspendForDuration.
> However, for now we don't support any duration other than zero.
> The same apply for flags.
> ---
>  include/libvirt/libvirt.h.in |    5 +++-
>  src/driver.h                 |    6 ++++
>  src/libvirt.c                |   58 ++++++++++++++++++++++++++++++++++++++++++
>  src/libvirt_public.syms      |    1 +
>  src/remote/remote_driver.c   |    1 +
>  src/remote/remote_protocol.x |   11 +++++++-
>  src/remote_protocol-structs  |    7 +++++
>  7 files changed, 87 insertions(+), 2 deletions(-)
> 
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index e99cd00..0117333 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -1232,7 +1232,10 @@ int                     virDomainFree           (virDomainPtr domain);
>   */
>  int                     virDomainSuspend        (virDomainPtr domain);
>  int                     virDomainResume         (virDomainPtr domain);
> -
> +int                     virDomainSuspendForDuration (virDomainPtr domain,
> +                                                     unsigned int target,
> +                                                     unsigned long long duration,
> +                                                     unsigned int flags);

NB, I would prefer to have this called either

  virDomainPMSuspendForDuration
  virDomainNodeSuspendForDuration

Since just using ""virDomainSuspendXXX" prefix, implies it is related
to the existing API of that name.

ACK if it is renamed to either one of those choices, or another
suggestion someone might have ?

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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