]> git.ipfire.org Git - thirdparty/libvirt.git/commit
utils: Implement function to pass a buffer to send via a fd to virCommand
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Thu, 25 Jul 2019 18:22:06 +0000 (14:22 -0400)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 26 Jul 2019 09:30:50 +0000 (10:30 +0100)
commit149eda402ff5f8cb5314b454e20aefc1023e129f
treef845cde54f757945215c2694fc422c1682c13b92
parent1f46dd4cbae2d37fc753a6a1a0b4af301a6191e1
utils: Implement function to pass a buffer to send via a fd to virCommand

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@linux.ibm.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/libvirt_private.syms
src/util/vircommand.c
src/util/vircommand.h