diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2014-06-18 08:43:55 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-06-23 11:12:28 -0400 |
commit | db39fcf1f690b02d612e2bfc00980700887abe03 (patch) | |
tree | 92274d002b118043816e66924b1d271c62ea2e3c /backends | |
parent | 751751732c48d8fc2facf76d72fc56ba68494f45 (diff) | |
download | qemu-db39fcf1f690b02d612e2bfc00980700887abe03.zip qemu-db39fcf1f690b02d612e2bfc00980700887abe03.tar.gz qemu-db39fcf1f690b02d612e2bfc00980700887abe03.tar.bz2 |
qemu-char: introduce qemu_chr_alloc
The next patch will modify this function to initialize state that is
common to all backends.
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'backends')
-rw-r--r-- | backends/baum.c | 2 | ||||
-rw-r--r-- | backends/msmouse.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/backends/baum.c b/backends/baum.c index 759003f..796512d 100644 --- a/backends/baum.c +++ b/backends/baum.c @@ -574,7 +574,7 @@ CharDriverState *chr_baum_init(void) int tty; baum = g_malloc0(sizeof(BaumDriverState)); - baum->chr = chr = g_malloc0(sizeof(CharDriverState)); + baum->chr = chr = qemu_chr_alloc(); chr->opaque = baum; chr->chr_write = baum_write; diff --git a/backends/msmouse.c b/backends/msmouse.c index c0dbfcd..650a531 100644 --- a/backends/msmouse.c +++ b/backends/msmouse.c @@ -67,7 +67,7 @@ CharDriverState *qemu_chr_open_msmouse(void) { CharDriverState *chr; - chr = g_malloc0(sizeof(CharDriverState)); + chr = qemu_chr_alloc(); chr->chr_write = msmouse_chr_write; chr->chr_close = msmouse_chr_close; chr->explicit_be_open = true; |