[libvirt] [PATCH v5 11/20] utils: Implement function to pass a buffer to send via a fd to virCommand
Daniel P. Berrangé
berrange at redhat.com
Thu Jul 25 09:44:49 UTC 2019
On Fri, Jul 12, 2019 at 12:23:45PM -0400, Stefan Berger wrote:
> Implement virCommandSetSendBuffer() that allows the caller to pass a
> file descriptor and buffer to virCommand. virCommand will write the
> buffer into the file descriptor. That file descriptor could be the
> write end of a pipe or one of the file descriptors of a socketpair.
> The other file descriptor should be passed to the launched process to
> read the data from.
>
> Only implement the function to allocate memory for send buffers
> and to free them later on.
>
> Signed-off-by: Stefan Berger <stefanb at linux.ibm.com>
> ---
> src/libvirt_private.syms | 1 +
> src/util/vircommand.c | 76 ++++++++++++++++++++++++++++++++++++++++
> src/util/vircommand.h | 5 +++
> 3 files changed, 82 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list