提交 efc23df2 编写于 作者: B Bjoern Walk 提交者: Michal Privoznik

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: NBjoern Walk <bwalk@linux.vnet.ibm.com>
上级 63910128
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册