提交 4764a6c5 编写于 作者: D Daniel P. Berrange

s/int/virLogDestination/ in logging code

The log destinations are an enum, but most of the code was
just using a plain 'int' for function params / variables.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 2dd77cd1
......@@ -564,7 +564,7 @@ static int virLogResetOutputs(void) {
* Returns -1 in case of failure or the output number if successful
*/
int virLogDefineOutput(virLogOutputFunc f, virLogCloseFunc c, void *data,
virLogPriority priority, int dest, const char *name,
virLogPriority priority, virLogDestination dest, const char *name,
unsigned int flags)
{
int ret = -1;
......@@ -1139,7 +1139,7 @@ char *virLogGetOutputs(void) {
virLogLock();
for (i = 0; i < virLogNbOutputs; i++) {
int dest = virLogOutputs[i].dest;
virLogDestination dest = virLogOutputs[i].dest;
if (i)
virBufferAsprintf(&outputbuf, " ");
switch (dest) {
......
......@@ -125,7 +125,7 @@ extern void virLogSetFromEnv(void);
extern int virLogDefineFilter(const char *match, virLogPriority priority,
unsigned int flags);
extern int virLogDefineOutput(virLogOutputFunc f, virLogCloseFunc c, void *data,
virLogPriority priority, int dest, const char *name,
virLogPriority priority, virLogDestination dest, const char *name,
unsigned int flags);
/*
......
......@@ -610,7 +610,7 @@ int virtTestMain(int argc,
virLogSetFromEnv();
if (!getenv("LIBVIRT_DEBUG") && !virLogGetNbOutputs()) {
if (virLogDefineOutput(virtTestLogOutput, virtTestLogClose, &testLog,
VIR_LOG_DEBUG, 0, NULL, 0) < 0)
VIR_LOG_DEBUG, VIR_LOG_TO_STDERR, NULL, 0) < 0)
return 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册