On 27.01.2012 14:25, Daniel P. Berrange wrote:
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.
Yes, but on the other hand, virDomainNode make me think it's (somehow,
magically) related to the host :)
So I'll choose virDomainPMSuspendForDuration here, and dompmsuspend in
virsh (the last patch of this set).
However, I am postponing the push for a while so others can chime in
(Eric?) as it seems we need a wider consensus on this.
ACK if it is renamed to either one of those choices, or another
suggestion someone might have ?
Daniel
Thanks.
Michal