From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45453) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR07d-00054x-0d for qemu-devel@nongnu.org; Wed, 03 Feb 2016 11:17:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aR07X-0002w3-4Y for qemu-devel@nongnu.org; Wed, 03 Feb 2016 11:17:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR07W-0002vh-Vs for qemu-devel@nongnu.org; Wed, 03 Feb 2016 11:17:31 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 8B6E67AE94 for ; Wed, 3 Feb 2016 16:17:30 +0000 (UTC) References: <1454511327-4812-1-git-send-email-berrange@redhat.com> From: Eric Blake Message-ID: <56B22819.6090003@redhat.com> Date: Wed, 3 Feb 2016 09:17:29 -0700 MIME-Version: 1.0 In-Reply-To: <1454511327-4812-1-git-send-email-berrange@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Gw7DBpvJefNo0G1mGa6TuCDwTnXCuhrNj" Subject: Re: [Qemu-devel] [PATCH] io: introduce helper for creating channels from file descriptors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: "Dr. David Alan Gilbert" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Gw7DBpvJefNo0G1mGa6TuCDwTnXCuhrNj Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/03/2016 07:55 AM, Daniel P. Berrange wrote: > Depending on what object a file descriptor refers to a different > type of IO channel will be needed - either a QIOChannelFile or > a QIOChannelSocket. Introduce a qio_channel_new_fd() method > which will return the appropriate channel implementation. >=20 > Signed-off-by: Daniel P. Berrange > --- >=20 > Suggested during review of migration TLS patch series >=20 > https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg00607.html >=20 > and will be used by next posting of it. >=20 > include/io/channel-util.h | 52 ++++++++++++++++++++++++++++++++++= ++++++++ > io/Makefile.objs | 1 + > io/channel-util.c | 50 ++++++++++++++++++++++++++++++++++= ++++++ > tests/test-io-channel-file.c | 22 ++++++++++++++++++ > tests/test-io-channel-socket.c | 21 +++++++++++++++++ > 5 files changed, 146 insertions(+) > create mode 100644 include/io/channel-util.h > create mode 100644 io/channel-util.c >=20 > diff --git a/include/io/channel-util.h b/include/io/channel-util.h > new file mode 100644 > index 0000000..6fb2baf > --- /dev/null > +++ b/include/io/channel-util.h > @@ -0,0 +1,52 @@ > +/* > + * QEMU I/O channels utility APIs > + * > + * Copyright (c) 2015 Red Hat, Inc. 2016? > +++ b/io/channel-util.c > @@ -0,0 +1,50 @@ > +/* > + * QEMU I/O channels utility APIs > + * > + * Copyright (c) 2015 Red Hat, Inc. and again Otherwise, Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Gw7DBpvJefNo0G1mGa6TuCDwTnXCuhrNj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWsigZAAoJEKeha0olJ0Nq4NYIAI0UehUwNN6mgaG4KrZAx9av tY/esGQI0QUIIwom1sF1Hhm62mix9ASMcPxcXkXYVy9BYdFuH/LOZ5wKDapo/iV2 VNjJVTI5cvaKHRircqgtfYc9hyf26T886X8rCapfAx6PEJzVoEp4LtAOSKEgzdnM I16GlWtyUlcIbICu3p4pnKcUUB2ykRpcFgducxnBTPkvIpeHTqI75qevU/zNHh/Q BnKCOOBU4Qp4BUxJR9PngFN8oGMyJ2KG9KOmjbcqiZ/r9C9G9k9ZkAMMyZPw1tfx noAugNqxXarGRNIw+3T1BVAOgEDohFycSNbL9kFUzBABU5Qq3k6B4Qv4ma2ynDc= =qbac -----END PGP SIGNATURE----- --Gw7DBpvJefNo0G1mGa6TuCDwTnXCuhrNj--