From: Gal Hammer <ghammer@redhat.com>
To: qemu-devel@nongnu.org
Cc: amit.shah@redhat.com, peter.maydell@linaro.org,
Gal Hammer <ghammer@redhat.com>,
anthony@codemonkey.ws
Subject: [Qemu-devel] [PATCH 2/2] qtest: fix a "!chr->fd_in_tag" assertion error in qtest.
Date: Mon, 24 Feb 2014 12:16:42 +0200 [thread overview]
Message-ID: <1393237002-16980-3-git-send-email-ghammer@redhat.com> (raw)
In-Reply-To: <1393237002-16980-1-git-send-email-ghammer@redhat.com>
Replacement of the default chardev handlers now requires a call to
release the current handlers.
Signed-off-by: Gal Hammer <ghammer@redhat.com>
---
monitor.c | 1 +
qtest.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/monitor.c b/monitor.c
index de90fba..db52e7f 100644
--- a/monitor.c
+++ b/monitor.c
@@ -5024,6 +5024,7 @@ void monitor_init(CharDriverState *chr, int flags)
if (monitor_ctrl_mode(mon)) {
mon->mc = g_malloc0(sizeof(MonitorControl));
/* Control mode requires special handlers */
+ qemu_chr_add_handlers(chr, NULL, NULL, NULL, NULL);
qemu_chr_add_handlers(chr, monitor_can_read, monitor_control_read,
monitor_control_event, mon);
qemu_chr_fe_set_echo(chr, true);
diff --git a/qtest.c b/qtest.c
index ae941d6..a5682ee 100644
--- a/qtest.c
+++ b/qtest.c
@@ -519,6 +519,8 @@ void qtest_init(const char *qtest_chrdev, const char *qtest_log, Error **errp)
return;
}
+ /* Replace the default tcp's handlers with qtest's handlers. */
+ qemu_chr_add_handlers(chr, NULL, NULL, NULL, NULL);
qemu_chr_add_handlers(chr, qtest_can_read, qtest_read, qtest_event, chr);
qemu_chr_fe_set_echo(chr, true);
--
1.8.5.3
next prev parent reply other threads:[~2014-02-24 10:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 10:16 [Qemu-devel] [PATCH 0/2] char: restore read callback on a reattached (hotplug) chardev Gal Hammer
2014-02-24 10:16 ` [Qemu-devel] [PATCH 1/2] " Gal Hammer
2014-02-24 10:16 ` Gal Hammer [this message]
2014-02-24 10:32 ` [Qemu-devel] [PATCH 2/2] qtest: fix a "!chr->fd_in_tag" assertion error in qtest Paolo Bonzini
2014-02-24 11:44 ` Gal Hammer
2014-02-25 10:18 ` Gal Hammer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1393237002-16980-3-git-send-email-ghammer@redhat.com \
--to=ghammer@redhat.com \
--cc=amit.shah@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).