On 01/30/2017 07:39 AM, Marc-André Lureau wrote:
> The class kind is necessary to lookup the chardev name in
> qmp_chardev_add() after calling qemu_chr_new_from_opts() and to set
> the appropriate ChardevBackend (mainly to free the right
> fields).
> 
> qemu_chr_new_from_opts() can be changed to use a non-qmp function
> using the chardev class typename. Introduce qemu_chardev_add() to be
> called from qemu_chr_new_from_opts() and remove the class chardev kind
> field. Set the backend->type in the parse callback (when non-common
> fields are added).
> 
> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
> ---
>  include/sysemu/char.h |  1 -
>  backends/baum.c       |  1 -
>  backends/msmouse.c    |  1 -
>  backends/testdev.c    |  1 -
>  qemu-char.c           | 99 
> +++++++++++++++++++++++++--------------------------
>  spice-qemu-char.c     |  4 +--
>  ui/console.c          |  2 +-
>  ui/gtk.c              |  1 -
>  8 files changed, 51 insertions(+), 59 deletions(-)
> 

Reviewed-by: Eric Blake <ebl...@redhat.com>

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to