mirror of https://gitee.com/openkylin/libvirt.git
qemuValidateDomainSmartcardDef: Move chardev validation under VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH
Don't check the type twice, move the chardev validation into the switch. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
d27edba370
commit
3c819a6ce8
|
@ -2112,6 +2112,9 @@ qemuValidateDomainSmartcardDef(const virDomainSmartcardDef *def,
|
||||||
_("this QEMU binary lacks smartcard passthrough mode support"));
|
_("this QEMU binary lacks smartcard passthrough mode support"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (qemuValidateDomainChrSourceDef(def->data.passthru, qemuCaps) < 0)
|
||||||
|
return -1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -2119,10 +2122,6 @@ qemuValidateDomainSmartcardDef(const virDomainSmartcardDef *def,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (def->type == VIR_DOMAIN_SMARTCARD_TYPE_PASSTHROUGH &&
|
|
||||||
qemuValidateDomainChrSourceDef(def->data.passthru, qemuCaps) < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue