diff options
author | Gonglei <arei.gonglei@huawei.com> | 2014-08-11 17:34:21 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-08-15 18:03:13 +0100 |
commit | 16b38080e3383252f9606c484eb5b43cff70b673 (patch) | |
tree | feab0e7e8d3822184799ab92ad669c6e38a161cd /COPYING.LIB | |
parent | 4ff12bdb1d7c74d95b7315f0a00d17e5cea32249 (diff) | |
download | hqemu-16b38080e3383252f9606c484eb5b43cff70b673.zip hqemu-16b38080e3383252f9606c484eb5b43cff70b673.tar.gz |
channel-posix: using qemu_set_nonblock() instead of fcntl(O_NONBLOCK)
Technically, fcntl(soc, F_SETFL, O_NONBLOCK)
is incorrect since it clobbers all other file flags.
We can use F_GETFL to get the current flags, set or
clear the O_NONBLOCK flag, then use F_SETFL to set the flags.
Using the qemu_set_nonblock() wrapper.
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Wangxin <wangxinxin.wang@huawei.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'COPYING.LIB')
0 files changed, 0 insertions, 0 deletions