]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Add a generic internal API for handling any FD based stream
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 22 Sep 2010 18:32:21 +0000 (19:32 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 11 Nov 2010 16:02:57 +0000 (16:02 +0000)
commit7c08fcc4396a78784ad0e33a8730a7b771f1bfac
tree26fed62403be0a702e89b87edc4e7cc8818d754a
parent4ef40df13dec5d52a72db38e1237ef9a92730193
Add a generic internal API for handling any FD based stream

To avoid the need for duplicating implementations of virStream
drivers, provide a generic implementation that can handle any
FD based stream. This code is copied from the existing impl
in the QEMU driver, with the locking moved into the stream
impl, and addition of a read callback

The FD stream code will refuse to operate on regular files or
block devices, since those can't report EAGAIN properly when
they would block on I/O

* include/libvirt/virterror.h, include/libvirt/virterror.h: Add
  VIR_FROM_STREAM error domain
* src/qemu/qemu_driver.c: Remove code obsoleted by the new
  generic streams driver.
* src/fdstream.h, src/fdstream.c, src/fdstream.c,
  src/libvirt_private.syms: Generic reusable FD based streams
.x-sc_avoid_write
configure.ac
include/libvirt/virterror.h
po/POTFILES.in
src/Makefile.am
src/fdstream.c [new file with mode: 0644]
src/fdstream.h [new file with mode: 0644]
src/libvirt_private.syms
src/qemu/qemu_driver.c
src/util/virterror.c