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

[libvirt] [PATCH REPOST 4/7] conf: Move virDomainControllerModelTypeToString



Move virDomainControllerModelTypeToString closer to it's counterpart
virDomainControllerModelTypeFromString.

Signed-off-by: John Ferlan <jferlan redhat com>
---
 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 a8b5173..6375b2b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7811,6 +7811,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
  */
@@ -19389,19 +19405,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


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