[PATCH 4/8] conf: Move virDomainControllerModelTypeToString

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

 



Move virDomainControllerModelTypeToString closer to it's counterpart
virDomainControllerModelTypeFromString.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 29 ++++++++++++++++-------------
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index db567f5..a3c50f1 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7798,6 +7798,22 @@ virDomainControllerModelTypeFromString(const virDomainControllerDef *def,
     return -1;
 }
 
+
+static const char *
+virDomainControllerModelTypeToString(virDomainControllerDefPtr def,
+                                     int model)
+{
+    if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI)
+        return virDomainControllerModelSCSITypeToString(model);
+    else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_USB)
+        return virDomainControllerModelUSBTypeToString(model);
+    else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI)
+        return virDomainControllerModelPCITypeToString(model);
+
+    return NULL;
+}
+
+
 /* Parse the XML definition for a controller
  * @param node XML nodeset to parse for controller definition
  */
@@ -19378,19 +19394,6 @@ virDomainDiskDefFormat(virBufferPtr buf,
     return 0;
 }
 
-static const char *
-virDomainControllerModelTypeToString(virDomainControllerDefPtr def,
-                                     int model)
-{
-    if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI)
-        return virDomainControllerModelSCSITypeToString(model);
-    else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_USB)
-        return virDomainControllerModelUSBTypeToString(model);
-    else if (def->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI)
-        return virDomainControllerModelPCITypeToString(model);
-
-    return NULL;
-}
 
 static int
 virDomainControllerDefFormat(virBufferPtr buf,
-- 
2.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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]