[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 24/30] qemu-char: do not forward events through the m
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 24/30] qemu-char: do not forward events through the mux until QEMU has started |
Date: |
Tue, 1 Nov 2016 17:29:37 +0100 |
Otherwise, the CHR_EVENT_OPENED event is sent twice: first when the
backend (for example "stdio") is opened, and second after processing
the command line.
The incorrect sending of the event prints the monitor banner when
QEMU is started with "-serial mon:stdio". This includes the "(qemu)"
prompt; thus the monitor seems to be dead, whereas actually the
active front-end is the serial port.
Reported-by: Dr. David Alan Gilbert <address@hidden>
Tested-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
qemu-char.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/qemu-char.c b/qemu-char.c
index 1e5a0e8..2c9940c 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -735,19 +735,23 @@ static void mux_chr_read(void *opaque, const uint8_t
*buf, int size)
}
}
+static bool muxes_realized;
+
static void mux_chr_event(void *opaque, int event)
{
CharDriverState *chr = opaque;
MuxDriver *d = chr->opaque;
int i;
+ if (!muxes_realized) {
+ return;
+ }
+
/* Send the event to all registered listeners */
for (i = 0; i < d->mux_cnt; i++)
mux_chr_send_event(d, i, event);
}
-static bool muxes_realized;
-
/**
* Called after processing of default and command-line-specified
* chardevs to deliver CHR_EVENT_OPENED events to any FEs attached
--
2.7.4
- [Qemu-devel] [PULL 15/30] nbd: Share common option-sending code in client, (continued)
- [Qemu-devel] [PULL 15/30] nbd: Share common option-sending code in client, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 18/30] nbd: Less allocation during NBD_OPT_LIST, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 17/30] nbd: Let client skip portions of server reply, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 16/30] nbd: Let server know when client gives up negotiation, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 12/30] nbd: Rename struct nbd_request and nbd_reply, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 19/30] nbd: Support shorter handshake, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 20/30] nbd: Refactor conversion to errno to silence checkpatch, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 21/30] nbd: Improve server handling of shutdown requests, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 22/30] nbd: Implement NBD_CMD_WRITE_ZEROES on server, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 23/30] nbd: Implement NBD_CMD_WRITE_ZEROES on client, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 24/30] qemu-char: do not forward events through the mux until QEMU has started,
Paolo Bonzini <=
- [Qemu-devel] [PULL 26/30] x86: add AVX512_4VNNIW and AVX512_4FMAPS features, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 25/30] slirp: fix CharDriver breakage, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 28/30] vl: exit qemu on guest panic if -no-shutdown is not set, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 27/30] checkpatch: allow spaces before parenthesis for 'coroutine_fn', Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 30/30] main-loop: Suppress I/O thread warning under qtest, Paolo Bonzini, 2016/11/01
- [Qemu-devel] [PULL 29/30] docs/rcu.txt: Fix minor typo, Paolo Bonzini, 2016/11/01
- Re: [Qemu-devel] [PULL v2 00/30] Misc patches for 2016-10-31, no-reply, 2016/11/01
- Re: [Qemu-devel] [PULL v2 00/30] Misc patches for 2016-10-31, Peter Maydell, 2016/11/01