From 5345fdb4467816c44f6752b3a1f4e73aa25919f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sat, 22 Oct 2016 12:52:55 +0300 Subject: char: use qemu_chr_fe* functions with CharBackend argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This also switches from qemu_chr_add_handlers() to qemu_chr_fe_set_handlers(). Note that qemu_chr_fe_set_handlers() now takes the focus when fe_open (qemu_chr_add_handlers() did take the focus) Signed-off-by: Marc-André Lureau Message-Id: <20161022095318.17775-16-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- hw/arm/omap2.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'hw/arm/omap2.c') diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c index 43d9c4b..6f05c98 100644 --- a/hw/arm/omap2.c +++ b/hw/arm/omap2.c @@ -771,14 +771,15 @@ static void omap_sti_fifo_write(void *opaque, hwaddr addr, /* Flush channel value. */ /* XXX this blocks entire thread. Rewrite to use * qemu_chr_fe_write and background I/O callbacks */ - qemu_chr_fe_write_all(s->chr.chr, (const uint8_t *) "\r", 1); + qemu_chr_fe_write_all(&s->chr, (const uint8_t *) "\r", 1); } else if (ch == STI_TRACE_CONSOLE_CHANNEL || 1) { if (value == 0xc0 || value == 0xc3) { /* Open channel ch. */ - } else if (value == 0x00) - qemu_chr_fe_write_all(s->chr.chr, (const uint8_t *) "\n", 1); - else - qemu_chr_fe_write_all(s->chr.chr, &byte, 1); + } else if (value == 0x00) { + qemu_chr_fe_write_all(&s->chr, (const uint8_t *) "\n", 1); + } else { + qemu_chr_fe_write_all(&s->chr, &byte, 1); + } } } -- cgit v1.1