[libvirt] [PATCH RFC 09/22] qemu_capabilities: Detect caps probe failure by checking monitor ptr

Jiri Denemark jdenemar at redhat.com
Tue Nov 27 15:31:10 UTC 2018


On Sun, Nov 11, 2018 at 13:59:17 -0600, Chris Venteicher wrote:
> Failure to connect to QEMU to probe capabilities is not considered a error case
> and does not result in a negative return value.

That's not really true anymore. It used to be true when there was a
fallback to parsing qemu -help output, but that's gone for some time
now. So even though virQEMUCapsInitQMP reports 0 when probe fails, the
caller (virQEMUCapsNewForBinaryInternal) uses !qemuCaps->usedQMP check
to see whether we actually probed for anything. If not, an error is
reported anyway.

Thus this patch can be dropped completely and virQEMUCapsInitQMP should
be fixed to just properly report an error when probing fails. And it
should be done earlier, just before patch 8 I think.

Jirka




More information about the libvir-list mailing list