mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 14:35:25 +00:00
domain_validate: Move virDomainCheckVirtioOptionsAreAbsent() a few lines forward
Move this function in order to use it in the next patch before its previous declaration. Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
e6c6efc208
commit
b5d25b8183
@ -78,6 +78,34 @@ virDomainDefVideoValidate(const virDomainDef *def)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
virDomainCheckVirtioOptionsAreAbsent(virDomainVirtioOptionsPtr virtio)
|
||||||
|
{
|
||||||
|
if (!virtio)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (virtio->iommu != VIR_TRISTATE_SWITCH_ABSENT) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("iommu driver option is only supported "
|
||||||
|
"for virtio devices"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (virtio->ats != VIR_TRISTATE_SWITCH_ABSENT) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("ats driver option is only supported "
|
||||||
|
"for virtio devices"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (virtio->packed != VIR_TRISTATE_SWITCH_ABSENT) {
|
||||||
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("packed driver option is only supported "
|
||||||
|
"for virtio devices"));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virDomainVideoDefValidate(const virDomainVideoDef *video,
|
virDomainVideoDefValidate(const virDomainVideoDef *video,
|
||||||
const virDomainDef *def)
|
const virDomainDef *def)
|
||||||
@ -236,34 +264,6 @@ virSecurityDeviceLabelDefValidate(virSecurityDeviceLabelDefPtr *seclabels,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
virDomainCheckVirtioOptionsAreAbsent(virDomainVirtioOptionsPtr virtio)
|
|
||||||
{
|
|
||||||
if (!virtio)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
if (virtio->iommu != VIR_TRISTATE_SWITCH_ABSENT) {
|
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
||||||
_("iommu driver option is only supported "
|
|
||||||
"for virtio devices"));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (virtio->ats != VIR_TRISTATE_SWITCH_ABSENT) {
|
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
||||||
_("ats driver option is only supported "
|
|
||||||
"for virtio devices"));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
if (virtio->packed != VIR_TRISTATE_SWITCH_ABSENT) {
|
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
|
||||||
_("packed driver option is only supported "
|
|
||||||
"for virtio devices"));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virDomainDiskVhostUserValidate(const virDomainDiskDef *disk)
|
virDomainDiskVhostUserValidate(const virDomainDiskDef *disk)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user