[PATCH 1/5] domain_conf: Move virDomainNetVhostuserMode enum declaration

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

 



While it's true that the virDomainNetVhostuserMode enum is used
solely in virDomainNetDefParseXML(), its placement just above the
function is rather unfortunate. Let's put it at the beginning of
the file with the rest of the enum declarations/implementations.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 1cf2bf84bc..dc5c0b0ba5 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1500,6 +1500,23 @@ VIR_ENUM_IMPL(virDomainLaunchSecurity,
               "s390-pv",
 );
 
+typedef enum {
+    VIR_DOMAIN_NET_VHOSTUSER_MODE_NONE,
+    VIR_DOMAIN_NET_VHOSTUSER_MODE_CLIENT,
+    VIR_DOMAIN_NET_VHOSTUSER_MODE_SERVER,
+
+    VIR_DOMAIN_NET_VHOSTUSER_MODE_LAST
+} virDomainNetVhostuserMode;
+
+VIR_ENUM_DECL(virDomainNetVhostuserMode);
+VIR_ENUM_IMPL(virDomainNetVhostuserMode,
+              VIR_DOMAIN_NET_VHOSTUSER_MODE_LAST,
+              "",
+              "client",
+              "server",
+);
+
+
 static virClass *virDomainObjClass;
 static virClass *virDomainXMLOptionClass;
 static void virDomainObjDispose(void *obj);
@@ -9222,23 +9239,6 @@ virDomainNetDefParseXMLRequireSource(virDomainNetDef *def,
 }
 
 
-typedef enum {
-    VIR_DOMAIN_NET_VHOSTUSER_MODE_NONE,
-    VIR_DOMAIN_NET_VHOSTUSER_MODE_CLIENT,
-    VIR_DOMAIN_NET_VHOSTUSER_MODE_SERVER,
-
-    VIR_DOMAIN_NET_VHOSTUSER_MODE_LAST
-} virDomainNetVhostuserMode;
-
-VIR_ENUM_DECL(virDomainNetVhostuserMode);
-VIR_ENUM_IMPL(virDomainNetVhostuserMode,
-              VIR_DOMAIN_NET_VHOSTUSER_MODE_LAST,
-              "",
-              "client",
-              "server",
-);
-
-
 static virDomainNetDef *
 virDomainNetDefParseXML(virDomainXMLOption *xmlopt,
                         xmlNodePtr node,
-- 
2.39.1




[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