On 20/12/2017 16:11, Paolo Bonzini wrote:
> On 03/11/2017 16:28, Marc-André Lureau wrote:
>> Hi,
>>
>> The following patches fix and test the behaviour of mux chardev
>> events, after a regression introduced in qemu 2.8.0.
>>
>> v1->v2:
>> - fix incompatible pointer type warning spotted by patchew
>>
>> Marc-André Lureau (2):
>> chardev: fix backend events regression with mux chardev
>> test: add some chardev mux event tests
>>
>> include/chardev/char.h | 1 +
>> chardev/char-mux.c | 8 ++++++++
>> chardev/char.c | 18 ++++++++++++------
>> tests/test-char.c | 17 +++++++++++++++++
>> 4 files changed, 38 insertions(+), 6 deletions(-)
>>
>
> Queued, thanks.
Actually according to Peter's testing this is needed:
diff --git a/chardev/char-mux.c b/chardev/char-mux.c
index 0553b48b90..567bf965cd 100644
--- a/chardev/char-mux.c
+++ b/chardev/char-mux.c
@@ -127,7 +127,9 @@ static void mux_chr_be_event(Chardev *chr, int event)
{
MuxChardev *d = MUX_CHARDEV(chr);
- mux_chr_send_event(d, d->focus, event);
+ if (d->focus != -1) {
+ mux_chr_send_event(d, d->focus, event);
+ }
}
static int mux_proc_byte(Chardev *chr, MuxChardev *d, int ch)