diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-10-22 12:52:52 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-10-24 15:27:20 +0200 |
commit | 32a6ebecd2ffe82ffade5edf9e054e20cb48f281 (patch) | |
tree | b1e82e3f6eb4a28c65098015dd8114e190a064bf /qtest.c | |
parent | becdfa00cfa2995e859ccefa4b7d72a72eb96581 (diff) | |
download | qemu-32a6ebecd2ffe82ffade5edf9e054e20cb48f281.zip qemu-32a6ebecd2ffe82ffade5edf9e054e20cb48f281.tar.gz qemu-32a6ebecd2ffe82ffade5edf9e054e20cb48f281.tar.bz2 |
char: remaining switch to CharBackend in frontend
Similar to previous change, for the remaining CharDriverState front ends
users.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20161022095318.17775-13-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qtest.c')
-rw-r--r-- | qtest.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) |