]> xenbits.xensource.com Git - libvirt.git/commitdiff
virnetdevvportprofile: Turn virNetDevVPortProfileLinkOp enum into a proper typedef
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 18 Sep 2023 13:45:12 +0000 (15:45 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 20 Sep 2023 15:18:48 +0000 (17:18 +0200)
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 <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/util/virnetdevvportprofile.c

index 33bcd350c493d771f11fe83e28ff723658e77528..6d5bfbe8705ca945b3cd185a0b7c23392f7bccee 100644 (file)
@@ -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;