[PATCH v2 1/2] move virDomainCheckVirtioOptionsAreAbsent a few lines forward

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Moving this function in order to use it in the next patch before
its previous declaration.

Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx>
---
 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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux