mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
tools: virt-host-validate: improve error handling
When virHostValidateCPUFlag returns NULL, that's more an unexpected error than the sign of missing CPU flags. Let's react to this appropriately. Signed-off-by: Bjoern Walk <bwalk@linux.vnet.ibm.com>
This commit is contained in:
parent
6391012852
commit
efc23df251
@ -33,10 +33,10 @@ int virHostValidateQEMU(void)
|
||||
|
||||
virHostMsgCheck("QEMU", "%s", _("for hardware virtualization"));
|
||||
|
||||
flags = virHostValidateGetCPUFlags();
|
||||
if (!(flags = virHostValidateGetCPUFlags()))
|
||||
return -1;
|
||||
|
||||
if (flags &&
|
||||
(virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_SVM) ||
|
||||
if ((virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_SVM) ||
|
||||
virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_VMX))) {
|
||||
virHostMsgPass();
|
||||
if (virHostValidateDeviceExists("QEMU", "/dev/kvm",
|
||||
|
Loading…
Reference in New Issue
Block a user