Moving this function in order to use it in the next patch before
its previous declaration.
Signed-off-by: Kristina Hanicova <khanicov(a)redhat.com>
---
src/conf/domain_validate.c | 56 +++++++++++++++++++-------------------
1 file changed, 28 insertions(+), 28 deletions(-)
diff --git a/src/conf/domain_validate.c b/src/conf/domain_validate.c
index b4e09e21fe..dabdd7b8eb 100644
--- a/src/conf/domain_validate.c
+++ b/src/conf/domain_validate.c
@@ -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
virDomainVideoDefValidate(const virDomainVideoDef *video,
const virDomainDef *def)
@@ -228,34 +256,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
virDomainDiskVhostUserValidate(const virDomainDiskDef *disk)
{
--
2.29.2