[libvirt PATCH 0/3] Introudce virCommandPassFDIndex

Ján Tomko posted 3 patches 4 years ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1606226180.git.jtomko@redhat.com
src/libvirt_private.syms |  1 +
src/qemu/qemu_command.c  | 38 +++++++++++++++++++++++++-------------
src/util/vircommand.c    | 28 ++++++++++++++++++++++++++--
src/util/vircommand.h    |  5 +++++
4 files changed, 57 insertions(+), 15 deletions(-)
[libvirt PATCH 0/3] Introudce virCommandPassFDIndex
Posted by Ján Tomko 4 years ago
Simplify passing file descriptors via add-fd by adding a new
parameter to virCommandPassFD that returns the index of the passed
FD right away, removing the need to look it up later and pretend
to handle errors which cannot happen - we've just put the file
descriptor there, why would it not be there?

This should also silence Coverity - in that regard it's an alternative
to Pavel's patch:
https://www.redhat.com/archives/libvir-list/2020-November/msg00885.html

Ján Tomko (3):
  util: introduce virCommandPassFDIndex
  qemu: introduce qemuBuildFDSet
  qemu: use qemuVirCommandGetDevSet less

 src/libvirt_private.syms |  1 +
 src/qemu/qemu_command.c  | 38 +++++++++++++++++++++++++-------------
 src/util/vircommand.c    | 28 ++++++++++++++++++++++++++--
 src/util/vircommand.h    |  5 +++++
 4 files changed, 57 insertions(+), 15 deletions(-)

-- 
2.26.2

Re: [libvirt PATCH 0/3] Introudce virCommandPassFDIndex
Posted by Peter Krempa 4 years ago
On Tue, Nov 24, 2020 at 15:02:24 +0100, Ján Tomko wrote:
> Simplify passing file descriptors via add-fd by adding a new
> parameter to virCommandPassFD that returns the index of the passed
> FD right away, removing the need to look it up later and pretend
> to handle errors which cannot happen - we've just put the file
> descriptor there, why would it not be there?
> 
> This should also silence Coverity - in that regard it's an alternative
> to Pavel's patch:
> https://www.redhat.com/archives/libvir-list/2020-November/msg00885.html
> 
> Ján Tomko (3):
>   util: introduce virCommandPassFDIndex
>   qemu: introduce qemuBuildFDSet
>   qemu: use qemuVirCommandGetDevSet less

Reviewed-by: Peter Krempa <pkrempa@redhat.com>