[PATCH] qemu: capabilities: Remove check for /usr/libexec/qemu-kvm
Andrea Bolognani
abologna at redhat.com
Wed Mar 30 17:39:09 UTC 2022
On Wed, Mar 30, 2022 at 06:13:58PM +0100, Daniel P. Berrangé wrote:
> On Wed, Mar 30, 2022 at 09:59:11AM -0700, Andrea Bolognani wrote:
> > + if (virQEMUCapsGuestIsNative(hostarch, guestarch)) {
> > + if ((ret = virFindFileInPath("/usr/libexec/qemu-kvm")) != NULL) {
> > + return ret;
> > + }
> > + }
> > +
> > return ret;
> > }
>
> That overwrites the existing 'ret' value that we want to keep
> when qemu-kvm isn't present. Needs
>
> if (!ret && virQEMUCapsGuestIsNative(hostarch, guestarch)) {
> ...
Does it? All previous attempts immediately return ret if it's not
NULL, so if we get to this point we know that there's no existing
value to preserve.
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list