From 32a6ebecd2ffe82ffade5edf9e054e20cb48f281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sat, 22 Oct 2016 12:52:52 +0300 Subject: char: remaining switch to CharBackend in frontend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Similar to previous change, for the remaining CharDriverState front ends users. Signed-off-by: Marc-André Lureau Message-Id: <20161022095318.17775-13-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- qtest.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'qtest.c') diff --git a/qtest.c b/qtest.c index 2d9a021..3fb3c11 100644 --- a/qtest.c +++ b/qtest.c @@ -38,7 +38,7 @@ bool qtest_allowed; static DeviceState *irq_intercept_dev; static FILE *qtest_log_fp; -static CharDriverState *qtest_chr; +static CharBackend qtest_chr; static GString *inbuf; static int irq_levels[MAX_IRQ]; static qemu_timeval start_time; @@ -249,7 +249,7 @@ static void qtest_irq_handler(void *opaque, int n, int level) qemu_set_irq(old_irq, level); if (irq_levels[n] != level) { - CharDriverState *chr = qtest_chr; + CharDriverState *chr = qtest_chr.chr; irq_levels[n] = level; qtest_send_prefix(chr); qtest_sendf(chr, "IRQ %s %d\n", @@ -690,12 +690,12 @@ void qtest_init(const char *qtest_chrdev, const char *qtest_log, Error **errp) qemu_chr_fe_set_echo(chr, true); inbuf = g_string_new(""); - qtest_chr = chr; + qemu_chr_fe_init(&qtest_chr, chr, errp); } bool qtest_driver(void) { - return qtest_chr; + return qtest_chr.chr != NULL; } static void qtest_accel_class_init(ObjectClass *oc, void *data) -- cgit v1.1