[libvirt] [PATCH v2 3/3] qemu: Implement virDomainPMWakeup API

Eric Blake eblake at redhat.com
Sat Feb 25 00:31:40 UTC 2012


On 02/23/2012 01:44 AM, Michal Privoznik wrote:
> On 15.02.2012 16:04, Michal Privoznik wrote:
>> using 'system-wakeup' monitor command. It is supported only in JSON,
>> as we are enabling it if possible. Moreover, this command is available
>> in qemu-1.1+ which definitely has JSON.
>> ---
>>  src/qemu/qemu_driver.c       |   55 ++++++++++++++++++++++++++++++++++++++++++
>>  src/qemu/qemu_monitor.c      |   19 ++++++++++++++
>>  src/qemu/qemu_monitor.h      |    2 +
>>  src/qemu/qemu_monitor_json.c |   21 ++++++++++++++++
>>  src/qemu/qemu_monitor_json.h |    2 +
>>  5 files changed, 99 insertions(+), 0 deletions(-)
>>
> 
> Ping? Eric, it seems to me like you've forgotten this last patch.

Indeed, it fell off my stack of most-recently-pinged patches.  Reviewing
now, and thanks for the ping...

> using 'system-wakeup' monitor command. It is supported only in JSON,
> as we are enabling it if possible. Moreover, this command is available
> in qemu-1.1+ which definitely has JSON.
> ---
>  src/qemu/qemu_driver.c       |   55 ++++++++++++++++++++++++++++++++++++++++++
>  src/qemu/qemu_monitor.c      |   19 ++++++++++++++
>  src/qemu/qemu_monitor.h      |    2 +
>  src/qemu/qemu_monitor_json.c |   21 ++++++++++++++++
>  src/qemu/qemu_monitor_json.h |    2 +
>  5 files changed, 99 insertions(+), 0 deletions(-)
> 
>  
> +static int qemuDomainPMWakeup(virDomainPtr dom,
> +                              unsigned int flags)

Style nit - we aren't very consistent on whether function names begin on
line 1, but qemu_driver tends to use:

static int
qemuDomainPMWakeup(virDomainPtr dom,
                   unsigned int flags)

> +++ b/src/qemu/qemu_monitor_json.c
> @@ -3492,3 +3492,24 @@ int qemuMonitorJSONGetBlockIoThrottle(qemuMonitorPtr mon,
>      virJSONValueFree(result);
>      return ret;
>  }
> +
> +int qemuMonitorJSONSystemWakeup(qemuMonitorPtr mon)
> +{
> +    int ret = -1;
> +    virJSONValuePtr cmd = NULL;
> +    virJSONValuePtr reply = NULL;
> +
> +    cmd = qemuMonitorJSONMakeCommand("system_wakeup", NULL);

Seems so simple :)

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120224/98312b78/attachment-0001.sig>


More information about the libvir-list mailing list