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. > > Signed-off-by: Daniel P. Berrange <berra...@redhat.com> > --- > > Suggested during review of migration TLS patch series > > https://lists.gnu.org/archive/html/qemu-devel/2016-02/msg00607.html > > and will be used by next posting of it. > > 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 > > 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 <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature