As we are doing with the enum structures, a cleanup in
"src/nwfilter/" directory was done now. All the enums that were
defined in the header files were converted to typedefs in this
directory. This patch includes all the adjustments to remove
conflicts when you do this kind of change. "Enum-to-typedef"'s
conversions were made in "src/nwfilter/nwfilter_{gentech_driver,
learnipaddr, tech_driver}.h".
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
src/nwfilter/nwfilter_gentech_driver.c | 12 ++++++------
src/nwfilter/nwfilter_gentech_driver.h | 4 ++--
src/nwfilter/nwfilter_learnipaddr.c | 2 +-
src/nwfilter/nwfilter_learnipaddr.h | 8 ++++----
src/nwfilter/nwfilter_tech_driver.h | 6 +++---
5 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/nwfilter/nwfilter_gentech_driver.c
b/src/nwfilter/nwfilter_gentech_driver.c
index 5bed106..5a4c896 100644
--- a/src/nwfilter/nwfilter_gentech_driver.c
+++ b/src/nwfilter/nwfilter_gentech_driver.c
@@ -332,7 +332,7 @@ static int
virNWFilterDefToInst(virNWFilterDriverStatePtr driver,
virNWFilterDefPtr def,
virNWFilterHashTablePtr vars,
- enum instCase useNewFilter,
+ instCase useNewFilter,
bool *foundNewFilter,
virNWFilterInstPtr inst);
@@ -374,7 +374,7 @@ static int
virNWFilterIncludeDefToRuleInst(virNWFilterDriverStatePtr driver,
virNWFilterIncludeDefPtr inc,
virNWFilterHashTablePtr vars,
- enum instCase useNewFilter,
+ instCase useNewFilter,
bool *foundNewFilter,
virNWFilterInstPtr inst)
{
@@ -464,7 +464,7 @@ static int
virNWFilterDefToInst(virNWFilterDriverStatePtr driver,
virNWFilterDefPtr def,
virNWFilterHashTablePtr vars,
- enum instCase useNewFilter,
+ instCase useNewFilter,
bool *foundNewFilter,
virNWFilterInstPtr inst)
{
@@ -630,7 +630,7 @@ virNWFilterInstantiate(const unsigned char *vmuuid ATTRIBUTE_UNUSED,
int ifindex,
const char *linkdev,
virNWFilterHashTablePtr vars,
- enum instCase useNewFilter, bool *foundNewFilter,
+ instCase useNewFilter, bool *foundNewFilter,
bool teardownOld,
const virMacAddr *macaddr,
virNWFilterDriverStatePtr driver,
@@ -782,7 +782,7 @@ __virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver,
const virMacAddr *macaddr,
const char *filtername,
virNWFilterHashTablePtr filterparams,
- enum instCase useNewFilter,
+ instCase useNewFilter,
bool forceWithPendingReq,
bool *foundNewFilter)
{
@@ -896,7 +896,7 @@ _virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver,
const unsigned char *vmuuid,
const virDomainNetDef *net,
bool teardownOld,
- enum instCase useNewFilter,
+ instCase useNewFilter,
bool *foundNewFilter)
{
const char *linkdev = (net->type == VIR_DOMAIN_NET_TYPE_DIRECT)
diff --git a/src/nwfilter/nwfilter_gentech_driver.h
b/src/nwfilter/nwfilter_gentech_driver.h
index 8349ab4..90db084 100644
--- a/src/nwfilter/nwfilter_gentech_driver.h
+++ b/src/nwfilter/nwfilter_gentech_driver.h
@@ -32,10 +32,10 @@ virNWFilterTechDriverPtr virNWFilterTechDriverForName(const char
*name);
int virNWFilterTechDriversInit(bool privileged);
void virNWFilterTechDriversShutdown(void);
-enum instCase {
+typedef enum {
INSTANTIATE_ALWAYS,
INSTANTIATE_FOLLOW_NEWFILTER,
-};
+} instCase;
int virNWFilterInstantiateFilter(virNWFilterDriverStatePtr driver,
diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.c
index 4cea9cf..05bebbb 100644
--- a/src/nwfilter/nwfilter_learnipaddr.c
+++ b/src/nwfilter/nwfilter_learnipaddr.c
@@ -771,7 +771,7 @@ virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver
ATTRIBUTE_UNUSED,
const char *filtername ATTRIBUTE_UNUSED,
virNWFilterHashTablePtr filterparams ATTRIBUTE_UNUSED,
virNWFilterDriverStatePtr driver ATTRIBUTE_UNUSED,
- enum howDetect howDetect ATTRIBUTE_UNUSED)
+ howDetect howdetect ATTRIBUTE_UNUSED)
{
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("IP parameter must be given since libvirt "
diff --git a/src/nwfilter/nwfilter_learnipaddr.h b/src/nwfilter/nwfilter_learnipaddr.h
index 1cc881a..9d7960b 100644
--- a/src/nwfilter/nwfilter_learnipaddr.h
+++ b/src/nwfilter/nwfilter_learnipaddr.h
@@ -30,10 +30,10 @@
# include "nwfilter_tech_driver.h"
# include <net/if.h>
-enum howDetect {
+typedef enum {
DETECT_DHCP = 1,
DETECT_STATIC = 2,
-};
+} howDetect;
typedef struct _virNWFilterIPAddrLearnReq virNWFilterIPAddrLearnReq;
typedef virNWFilterIPAddrLearnReq *virNWFilterIPAddrLearnReqPtr;
@@ -46,7 +46,7 @@ struct _virNWFilterIPAddrLearnReq {
char *filtername;
virNWFilterHashTablePtr filterparams;
virNWFilterDriverStatePtr driver;
- enum howDetect howDetect;
+ howDetect howDetect;
int status;
pthread_t thread;
@@ -61,7 +61,7 @@ int virNWFilterLearnIPAddress(virNWFilterTechDriverPtr techdriver,
const char *filtername,
virNWFilterHashTablePtr filterparams,
virNWFilterDriverStatePtr driver,
- enum howDetect howDetect);
+ howDetect howDetect);
virNWFilterIPAddrLearnReqPtr virNWFilterLookupLearnReq(int ifindex);
int virNWFilterTerminateLearnReq(const char *ifname);
diff --git a/src/nwfilter/nwfilter_tech_driver.h b/src/nwfilter/nwfilter_tech_driver.h
index 7b6f56f..05d2561 100644
--- a/src/nwfilter/nwfilter_tech_driver.h
+++ b/src/nwfilter/nwfilter_tech_driver.h
@@ -70,13 +70,13 @@ typedef int (*virNWFilterRemoveBasicRules)(const char *ifname);
typedef int (*virNWFilterDropAllRules)(const char *ifname);
-enum techDrvFlags {
+typedef enum {
TECHDRV_FLAG_INITIALIZED = (1 << 0),
-};
+} techDrvFlags;
struct _virNWFilterTechDriver {
const char *name;
- enum techDrvFlags flags;
+ techDrvFlags flags;
virNWFilterTechDrvInit init;
virNWFilterTechDrvShutdown shutdown;
--
1.7.10.4