From 69db3bd954c1e6e25243e274d111e3dbcee740f5 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 1 Feb 2023 09:24:27 +0100 Subject: [PATCH] domain_conf: Move virDomainNetVhostuserMode enum declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Ján Tomko --- 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,