From: Michal Privoznik Date: Wed, 1 Feb 2023 08:24:27 +0000 (+0100) Subject: domain_conf: Move virDomainNetVhostuserMode enum declaration X-Git-Tag: v9.1.0-rc1~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69db3bd954c1e6e25243e274d111e3dbcee740f5;p=thirdparty%2Flibvirt.git domain_conf: Move virDomainNetVhostuserMode enum declaration 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 --- 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,