qemu/chardev
xinhua.Cao 81e34930ce qemu-char: check errno together with ret < 0
In the tcp_chr_write function, we checked errno,
but errno was not reset before a read or write operation.
Therefore, this check of errno's actions is often
incorrect after EAGAIN has occurred.
we need check errno together with ret < 0.

Signed-off-by: xinhua.Cao <caoxinhua@huawei.com>
Message-Id: <20180704033642.15996-1-caoxinhua@huawei.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Fixes: 9fc53a10f8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-07-06 18:39:19 +02:00
..
baum.c
char-console.c
char-fd.c
char-fe.c
char-file.c
char-io.c
char-mux.c
char-null.c
char-parallel.c
char-pipe.c
char-pty.c
char-ringbuf.c
char-serial.c serial: Open non-block 2018-07-02 15:41:18 +02:00
char-socket.c qemu-char: check errno together with ret < 0 2018-07-06 18:39:19 +02:00
char-stdio.c chardev: don't splatter terminal settings on exit if not previously set 2018-06-28 19:05:30 +02:00
char-udp.c
char-win-stdio.c
char-win.c
char.c
Makefile.objs
msmouse.c
spice.c
testdev.c
trace-events
wctablet.c