KVM: selftests: Multiplex return code and fd in __kvm_create_device()
authorSean Christopherson <seanjc@google.com>
Thu, 17 Feb 2022 20:21:33 +0000 (12:21 -0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 11 Jun 2022 15:46:22 +0000 (11:46 -0400)
commit279eacbefad5d163a20f8fcde2fd9362bc24f7c7
tree84e74b7563361b0ad79a364f62e903762fedfccf
parent98f94ce42ac672b2abdcf38cfc0e60fd52e04995
KVM: selftests: Multiplex return code and fd in __kvm_create_device()

Multiplex the return value and fd (on success) in __kvm_create_device()
to mimic common library helpers that return file descriptors, e.g. open().

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/aarch64/vgic_init.c
tools/testing/selftests/kvm/include/kvm_util_base.h
tools/testing/selftests/kvm/lib/aarch64/vgic.c
tools/testing/selftests/kvm/lib/kvm_util.c