From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XH7z3-0006cG-9W for qemu-devel@nongnu.org; Tue, 12 Aug 2014 05:03:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XH7yy-0007aj-8A for qemu-devel@nongnu.org; Tue, 12 Aug 2014 05:03:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XH7yy-0007aY-0k for qemu-devel@nongnu.org; Tue, 12 Aug 2014 05:03:04 -0400 Date: Tue, 12 Aug 2014 10:02:56 +0100 From: Stefan Hajnoczi Message-ID: <20140812090256.GC20490@stefanha-thinkpad.redhat.com> References: <1407749661-11640-1-git-send-email-arei.gonglei@huawei.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+xNpyl7Qekk2NvDX" Content-Disposition: inline In-Reply-To: <1407749661-11640-1-git-send-email-arei.gonglei@huawei.com> Subject: Re: [Qemu-devel] [PATCH 0/2] using qemu_set_nonblock() instead of fcntl(O_NONBLOCK) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com Cc: weidong.huang@huawei.com, mst@redhat.com, wangxinxin.wang@huawei.com, peter.huangpeng@huawei.com, qemu-devel@nongnu.org, kraxel@redhat.com, pbonzini@redhat.com --+xNpyl7Qekk2NvDX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 11, 2014 at 05:34:19PM +0800, arei.gonglei@huawei.com wrote: > From: Gonglei >=20 > 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. >=20 > Using the qemu_set_nonblock() wrapper. >=20 > BTW, qemu_set_nonblock() locate qemu/socket.h, some other files > can not call it, such as tap-linux.c, maybe we can consider=20 > pulling it out. Any ideas? Thanks. >=20 > Gonglei (2): > qemu-char: using qemu_set_nonblock() instead of fcntl(O_NONBLOCK) > channel-posix: using qemu_set_nonblock() instead of fcntl(O_NONBLOCK) >=20 > 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 --+xNpyl7Qekk2NvDX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJT6dhAAAoJEJykq7OBq3PIdHAH/iJomyDquYDSpuTk/cxK4t9e Pyv8rquqY26phWJFs90rqE6aJop3YdccA1wtp/O4u1DaMeUkEA5yWM4VoQwngH9C Ek/YHFmPa1TAY6cLi4DaFGKj6biTDTgSVylCB2qQF1Vo79vbfIpuj+Ln1yf4IZas DLnUC4vuk5raLEHCg1+tMI/Ba1Khj5+qfKsr44J/btvYuQSdLrlMIdNQ3K0ChSFb EdSiuOWGURX5OLTx1ORe4BLJEeTIEjOxnHAfuf/0Tq7aTg6ATEp+FQJ4q+xDNGgv TK4ooLPS8mfDyhOZw2A+KBC5Zjyn9SHK5/jHEngTF2oOPhagwS7K95L5S0kybHM= =u30Y -----END PGP SIGNATURE----- --+xNpyl7Qekk2NvDX--