[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent |
Date: |
Tue, 22 Oct 2013 09:58:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 |
On 10/22/2013 07:55 AM, Wenchao Xia wrote:
> δΊ 2013/10/22 5:00, Eric Blake ει:
>> On 10/21/2013 03:16 AM, Wenchao Xia wrote:
>>> Signed-off-by: Wenchao Xia <address@hidden>
>>> ---
>>> qapi-schema.json | 56
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> 1 files changed, 56 insertions(+), 0 deletions(-)
>> Incomplete. Now that you are actually using the enum (see the spot I
>> pointed out in 5/6), you ALSO need to change:
>>
>> -{ 'type': 'EventInfo', 'data': {'name': 'str'} }
>> +{ 'type': 'EventInfo', 'data': {'name': 'QEvent'} }
>>
>> and make use of the enum in the QAPI documentation.
>>
> I just found QEvent is a int(enum) so this change can't be done.
Huh? That's the whole point of qapi enums - they are stored as int
constants in C code, but sent as strings over QMP.
> Is there a way to tell use QEvent's correspond string? Add a new
> way to specify enum's correspond string automatically? for example:
>
> { 'type': 'EventInfo', 'data': {'name': '&QEvent'}
No, QAPI does it for you already, no change in syntax needed.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH 3/6] qapi: rename prefix QEVENT to Q_EVENT, (continued)
[Qemu-devel] [PATCH 5/6] qapi: remove var monitor_event_names[], Wenchao Xia, 2013/10/21
[Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent, Wenchao Xia, 2013/10/21
Re: [Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent, Wenchao Xia, 2013/10/22
Re: [Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent,
Eric Blake <=
Re: [Qemu-devel] [PATCH 6/6] qapi: add doc for QEvent, Wenchao Xia, 2013/10/22
[Qemu-devel] [PATCH 4/6] qapi: move event defines to qapi-schema.json, Wenchao Xia, 2013/10/21
Re: [Qemu-devel] [PATCH 0/6] qapi: generate event defines automatically, Wenchao Xia, 2013/10/25