[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/6] qapi: move event defines to qapi-schema.jso
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 4/6] qapi: move event defines to qapi-schema.json |
Date: |
Mon, 21 Oct 2013 21:45:54 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 |
On 10/21/2013 03:16 AM, Wenchao Xia wrote:
> They are defined with capitals for compatibility, see monitor_event_names
> in monitor.c, which was used to set the event strings.
Agree; the existing 'query-events' commands returns all-capital strings.
>
> Signed-off-by: Wenchao Xia <address@hidden>
> ---
> include/monitor/monitor.h | 37 -------------------------------------
> qapi-schema.json | 37 +++++++++++++++++++++++++++++++++++++
> 2 files changed, 37 insertions(+), 37 deletions(-)
>
> -typedef enum QEvent {
> - Q_EVENT_SHUTDOWN,
> - Q_EVENT_RESET,
> - Q_EVENT_POWERDOWN,
> - Q_EVENT_STOP,
> - Q_EVENT_RESUME,
> - Q_EVENT_VNC_CONNECTED,
> - Q_EVENT_VNC_INITIALIZED,
> - Q_EVENT_VNC_DISCONNECTED,
> - Q_EVENT_BLOCK_IO_ERROR,
> - Q_EVENT_RTC_CHANGE,
> - Q_EVENT_WATCHDOG,
> - Q_EVENT_SPICE_CONNECTED,
> - Q_EVENT_SPICE_INITIALIZED,
> - Q_EVENT_SPICE_DISCONNECTED,
> - Q_EVENT_BLOCK_JOB_COMPLETED,
> - Q_EVENT_BLOCK_JOB_CANCELLED,
> - Q_EVENT_BLOCK_JOB_ERROR,
> - Q_EVENT_BLOCK_JOB_READY,
> - Q_EVENT_DEVICE_DELETED,
> - Q_EVENT_DEVICE_TRAY_MOVED,
> - Q_EVENT_NIC_RX_FILTER_CHANGED,
> - Q_EVENT_SUSPEND,
> - Q_EVENT_SUSPEND_DISK,
> - Q_EVENT_WAKEUP,
> - Q_EVENT_BALLOON_CHANGE,
> - Q_EVENT_SPICE_MIGRATE_COMPLETED,
> - Q_EVENT_GUEST_PANICKED,
> - Q_EVENT_BLOCK_IMAGE_CORRUPTED,
> -
> - /* Add to 'monitor_event_names' array in monitor.c when
> - * defining new events here */
> -
> - Q_EVENT_MAX,
> -} QEvent;
> -
> int monitor_cur_is_qmp(void);
>
> void monitor_protocol_event(QEvent event, QObject *data);
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 60f3fd1..fbc1fab 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -29,6 +29,43 @@
> 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
>
> ##
> +# @QEvent
Again, see my comment in 3/6 wondering wheter we should fix the code
generation python to special-case QEVENT when converting this enum into
C code, rather than adding lots of churn.
I see why you split the documentation patch into 6/6 - to let this one
focus on just minimal code motion.
--
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 5/6] qapi: remove var monitor_event_names[], (continued)
[Qemu-devel] [PATCH 4/6] qapi: move event defines to qapi-schema.json, Wenchao Xia, 2013/10/21
- Re: [Qemu-devel] [PATCH 4/6] qapi: move event defines to qapi-schema.json,
Eric Blake <=
Re: [Qemu-devel] [PATCH 0/6] qapi: generate event defines automatically, Wenchao Xia, 2013/10/25