mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 12:35:20 +00:00
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: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
2dd77cd1ff
commit
4764a6c5a3
@ -564,7 +564,7 @@ static int virLogResetOutputs(void) {
|
|||||||
* Returns -1 in case of failure or the output number if successful
|
* Returns -1 in case of failure or the output number if successful
|
||||||
*/
|
*/
|
||||||
int virLogDefineOutput(virLogOutputFunc f, virLogCloseFunc c, void *data,
|
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)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -1139,7 +1139,7 @@ char *virLogGetOutputs(void) {
|
|||||||
|
|
||||||
virLogLock();
|
virLogLock();
|
||||||
for (i = 0; i < virLogNbOutputs; i++) {
|
for (i = 0; i < virLogNbOutputs; i++) {
|
||||||
int dest = virLogOutputs[i].dest;
|
virLogDestination dest = virLogOutputs[i].dest;
|
||||||
if (i)
|
if (i)
|
||||||
virBufferAsprintf(&outputbuf, " ");
|
virBufferAsprintf(&outputbuf, " ");
|
||||||
switch (dest) {
|
switch (dest) {
|
||||||
|
@ -125,7 +125,7 @@ extern void virLogSetFromEnv(void);
|
|||||||
extern int virLogDefineFilter(const char *match, virLogPriority priority,
|
extern int virLogDefineFilter(const char *match, virLogPriority priority,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
extern int virLogDefineOutput(virLogOutputFunc f, virLogCloseFunc c, void *data,
|
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);
|
unsigned int flags);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -610,7 +610,7 @@ int virtTestMain(int argc,
|
|||||||
virLogSetFromEnv();
|
virLogSetFromEnv();
|
||||||
if (!getenv("LIBVIRT_DEBUG") && !virLogGetNbOutputs()) {
|
if (!getenv("LIBVIRT_DEBUG") && !virLogGetNbOutputs()) {
|
||||||
if (virLogDefineOutput(virtTestLogOutput, virtTestLogClose, &testLog,
|
if (virLogDefineOutput(virtTestLogOutput, virtTestLogClose, &testLog,
|
||||||
VIR_LOG_DEBUG, 0, NULL, 0) < 0)
|
VIR_LOG_DEBUG, VIR_LOG_TO_STDERR, NULL, 0) < 0)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user