[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 4/5] qmp: add query-acpi-ospm-status command
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [RFC 4/5] qmp: add query-acpi-ospm-status command |
Date: |
Fri, 30 May 2014 10:03:53 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 05/30/2014 09:45 AM, Igor Mammedov wrote:
>>> +-> { "execute": "query-acpi-ospm-status" }
>>> +<- { 'return': [ { 'device': 'd1', 'slot': 0, 'source': 1, 'status': 0},
>>
>> Should 'status' be represented as an enum type, rather than an
>> open-coded integer?
> it takes values from ACPI spec, which potentially could be anything
> in 32bit range, it would be better to stick to spec.
>
>>
>>> + { 'device': '', 'slot': 1, 'source': 0, 'status': 0},
>>> + { 'device': '', 'slot': 2, 'source': 0, 'status': 0},
>>
>> Why not make 'device' optional, and omit it when there is no associated
>> device string?
> Could you point to an example of an optional field?
Use this in the .json file:
'data' { '*device': 'str', 'slot': 'int', ... }
to set up the C code to have a 'has_device' bool parameter; when that
parameter is false, 'device' is omitted from the output. (Well, we've
been arguing that has_device is redundant for pointers, when NULL serves
just as well, but that's a bigger code scrub).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [RFC 1/5] qmp: add query-memory-devices command, (continued)
[Qemu-devel] [RFC 2/5] acpi: introduce TYPE_ACPI_DEVICE_IF interface, Igor Mammedov, 2014/05/28
[Qemu-devel] [RFC 3/5] acpi: implement ospm_status() method for PIIX4/ICH9_LPC devices, Igor Mammedov, 2014/05/28
[Qemu-devel] [RFC 4/5] qmp: add query-acpi-ospm-status command, Igor Mammedov, 2014/05/28
[Qemu-devel] [RFC 5/5] qmp: add ACPI_DEVICE_OST event handling, Igor Mammedov, 2014/05/28