mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 23:15:18 +00:00
ef4c325f25
The function is used to automatically feed a buffer into a pipe which can be used by the command to read contents of the buffer. Rather than passing in a pipe, let's create the pipe inside virCommandSetSendBuffer and directly associate the reader end with the command. This way the ownership of both ends of the pipe will end up with the virCommand right away reducing the need of cleanup in callers. The returned value then can be used just to format the appropriate arguments without worrying about cleanup or failure. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>