[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] qemu-char: using qemu_set_nonblock() instea
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] qemu-char: using qemu_set_nonblock() instead of fcntl(O_NONBLOCK) |
Date: |
Mon, 11 Aug 2014 13:51:55 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
On 08/11/2014 03:34 AM, 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.
>
> Signed-off-by: Wangxin <address@hidden>
> Signed-off-by: Gonglei <address@hidden>
> ---
> qemu-char.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature