]> git.proxmox.com Git - mirror_qemu.git/commit - ui/console.c
char: allocate CharDriverState as a single object
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 21 Oct 2016 20:44:44 +0000 (23:44 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 27 Jan 2017 17:07:59 +0000 (18:07 +0100)
commit41ac54b253f41df924c350ef63564df8e1d8ad88
treea6d8fdcb913b558c4f5ecc698bd82ae1a195705c
parent5ebd67030c4e4bc702d07a3e10c909be4520f170
char: allocate CharDriverState as a single object

Use a single allocation for CharDriverState, this avoids extra
allocations & pointers, and is a step towards more object-oriented
CharDriver.

Gtk console is a bit peculiar, gd_vc_chr_set_echo() used to have a
temporary VirtualConsole to save the echo bit. Instead now, we consider
whether vcd->console is set or not, and restore the echo bit saved in
VCDriverState when calling gd_vc_vte_init().

The casts added are temporary, they are replaced with QOM type-safe
macros in a later patch in this series.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
backends/baum.c
backends/msmouse.c
backends/testdev.c
gdbstub.c
hw/bt/hci-csr.c
include/sysemu/char.h
qemu-char.c
spice-qemu-char.c
ui/console.c
ui/gtk.c