From 4af0c1d60e2da52c865e032b37d48a5e086121f1 Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Mon, 18 Sep 2023 15:45:12 +0200 Subject: [PATCH] virnetdevvportprofile: Turn virNetDevVPortProfileLinkOp enum into a proper typedef MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows us to declare variables without using 'enum virNetDev....' and will become more useful in the near future (when virReportEnumRangeError() is fixed). Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- src/util/virnetdevvportprofile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/virnetdevvportprofile.c b/src/util/virnetdevvportprofile.c index 33bcd350c4..6d5bfbe870 100644 --- a/src/util/virnetdevvportprofile.c +++ b/src/util/virnetdevvportprofile.c @@ -69,12 +69,12 @@ VIR_LOG_INIT("util.netdevvportprofile"); # define LLDPAD_PID_FILE "/var/run/lldpad.pid" -enum virNetDevVPortProfileLinkOp { +typedef enum { VIR_NETDEV_VPORT_PROFILE_LINK_OP_ASSOCIATE = 0x1, VIR_NETDEV_VPORT_PROFILE_LINK_OP_DISASSOCIATE = 0x2, VIR_NETDEV_VPORT_PROFILE_LINK_OP_PREASSOCIATE = 0x3, VIR_NETDEV_VPORT_PROFILE_LINK_OP_PREASSOCIATE_RR = 0x4, -}; +} virNetDevVPortProfileLinkOp; #endif @@ -1024,7 +1024,7 @@ virNetDevVPortProfileOp8021Qbg(const char *ifname, const virMacAddr *macaddr, int vf, const virNetDevVPortProfile *virtPort, - enum virNetDevVPortProfileLinkOp virtPortOp, + virNetDevVPortProfileLinkOp virtPortOp, bool setlink_only) { int op = PORT_REQUEST_ASSOCIATE; @@ -1093,7 +1093,7 @@ virNetDevVPortProfileOp8021Qbh(const char *ifname, int32_t vf, const virNetDevVPortProfile *virtPort, const unsigned char *vm_uuid, - enum virNetDevVPortProfileLinkOp virtPortOp) + virNetDevVPortProfileLinkOp virtPortOp) { int rc = 0; char *physfndev = NULL;