[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/2] using qemu_set_nonblock() instead of fcntl(
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 0/2] using qemu_set_nonblock() instead of fcntl(O_NONBLOCK) |
Date: |
Tue, 12 Aug 2014 10:02:56 +0100 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Mon, Aug 11, 2014 at 05:34:19PM +0800, address@hidden wrote:
> From: Gonglei <address@hidden>
>
> 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.
>
> BTW, qemu_set_nonblock() locate qemu/socket.h, some other files
> can not call it, such as tap-linux.c, maybe we can consider
> pulling it out. Any ideas? Thanks.
>
> Gonglei (2):
> qemu-char: using qemu_set_nonblock() instead of fcntl(O_NONBLOCK)
> channel-posix: using qemu_set_nonblock() instead of fcntl(O_NONBLOCK)
>
> qemu-char.c | 4 ++--
> qga/channel-posix.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
More of a chardev series but trivial and I've reviewed it.
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
pgp7Cow6ZT9Iz.pgp
Description: PGP signature