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 <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik 2023-02-01 09:24:27 +01:00
parent b40b307889
commit 69db3bd954

View File

@ -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,