Skip to content
Commit 81e34930 authored by xinhua.Cao's avatar xinhua.Cao Committed by Paolo Bonzini
Browse files

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: default avatarxinhua.Cao <caoxinhua@huawei.com>
Message-Id: <20180704033642.15996-1-caoxinhua@huawei.com>
Reviewed-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Fixes: 9fc53a10
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 02693cc4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment