mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: capabilities: Tolerate missing @qemuCaps in virQEMUCapsSupportsGICVersion
Report the given GIC version as unsupported if @qemuCapsi is NULL. This will be helpful to run post parse callbacks even if qemu is not currently installed.
This commit is contained in:
parent
9088d42da1
commit
6df29d0816
@ -5676,7 +5676,8 @@ virQEMUCapsFillDomainDeviceHostdevCaps(virQEMUCapsPtr qemuCaps,
|
|||||||
* @version: GIC version
|
* @version: GIC version
|
||||||
*
|
*
|
||||||
* Checks the QEMU binary with capabilities @qemuCaps supports a specific
|
* Checks the QEMU binary with capabilities @qemuCaps supports a specific
|
||||||
* GIC version for a domain of type @virtType.
|
* GIC version for a domain of type @virtType. If @qemuCaps is NULL, the GIC
|
||||||
|
* @version is considered unsupported.
|
||||||
*
|
*
|
||||||
* Returns: true if the binary supports the requested GIC version, false
|
* Returns: true if the binary supports the requested GIC version, false
|
||||||
* otherwise
|
* otherwise
|
||||||
@ -5688,6 +5689,9 @@ virQEMUCapsSupportsGICVersion(virQEMUCapsPtr qemuCaps,
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
|
if (!qemuCaps)
|
||||||
|
return false;
|
||||||
|
|
||||||
for (i = 0; i < qemuCaps->ngicCapabilities; i++) {
|
for (i = 0; i < qemuCaps->ngicCapabilities; i++) {
|
||||||
virGICCapabilityPtr cap = &(qemuCaps->gicCapabilities[i]);
|
virGICCapabilityPtr cap = &(qemuCaps->gicCapabilities[i]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user