This will later utilize our VIR_ENUM_{DECL,IMPL} macros, so stay consistent
with the rest of the library. Also, this includes adding an explicit sentinel
_LAST to the enum.
---
src/util/virlog.c | 6 +++---
src/util/virlog.h | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/util/virlog.c b/src/util/virlog.c
index b8398d1..b4c16de 100644
--- a/src/util/virlog.c
+++ b/src/util/virlog.c
@@ -99,7 +99,7 @@ struct _virLogOutput {
virLogOutputFunc f;
virLogCloseFunc c;
virLogPriority priority;
- virLogDestination dest;
+ virLogDestinationType dest;
char *name;
};
typedef struct _virLogOutput virLogOutput;
@@ -372,7 +372,7 @@ virLogDefineOutput(virLogOutputFunc f,
virLogCloseFunc c,
void *data,
virLogPriority priority,
- virLogDestination dest,
+ virLogDestinationType dest,
const char *name,
unsigned int flags)
{
@@ -1332,7 +1332,7 @@ virLogGetOutputs(void)
virLogLock();
for (i = 0; i < virLogNbOutputs; i++) {
- virLogDestination dest = virLogOutputs[i].dest;
+ virLogDestinationType dest = virLogOutputs[i].dest;
if (i)
virBufferAddChar(&outputbuf, ' ');
switch (dest) {
diff --git a/src/util/virlog.h b/src/util/virlog.h
index 443b3cd..9ece3b5 100644
--- a/src/util/virlog.h
+++ b/src/util/virlog.h
@@ -55,7 +55,8 @@ typedef enum {
VIR_LOG_TO_SYSLOG,
VIR_LOG_TO_FILE,
VIR_LOG_TO_JOURNALD,
-} virLogDestination;
+ VIR_LOG_TO_OUTPUT_LAST,
+} virLogDestinationType;
typedef struct _virLogSource virLogSource;
typedef virLogSource *virLogSourcePtr;
@@ -183,7 +184,7 @@ extern int virLogDefineOutput(virLogOutputFunc f,
virLogCloseFunc c,
void *data,
virLogPriority priority,
- virLogDestination dest,
+ virLogDestinationType dest,
const char *name,
unsigned int flags);
--
2.4.3