[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] qga: process_event() simplification
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] qga: process_event() simplification |
Date: |
Wed, 20 Feb 2019 10:21:39 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 |
On 2/20/19 9:42 AM, Marc-André Lureau wrote:
> Simplify the code around qmp_dispatch():
> - rely on qmp_dispatch/check_obj() for message checking
> - have a single send_response() point
> - constify send_response() argument
>
> It changes a couple of error messages:
>
> * When @req isn't a dictionary, from
> Invalid JSON syntax
> to
> QMP input must be a JSON object
>
> * When @req lacks member "execute", from
> this feature or command is not currently supported
> to
> QMP input lacks member 'execute'
>
> CC: Michael Roth <address@hidden>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> qga/main.c | 47 +++++++++--------------------------------------
> 1 file changed, 9 insertions(+), 38 deletions(-)
Nice simplification.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org