2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

compel/log: Use enum as parameter for std_log_set_loglevel()

Doesn't change uapi, but makes it a bit more friendly and documented
which loglevel means what for foreign user.

Signed-off-by: Dmitry Safonov <dima@arista.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Dmitry Safonov
2019-07-25 23:01:07 +01:00
committed by Andrei Vagin
parent b25d1facae
commit d2d6e3f537
2 changed files with 4 additions and 2 deletions

View File

@@ -1,10 +1,12 @@
#ifndef COMPEL_PLUGIN_STD_LOG_H__
#define COMPEL_PLUGIN_STD_LOG_H__
#include "compel/loglevels.h"
#define STD_LOG_SIMPLE_CHUNK 256
extern void std_log_set_fd(int fd);
extern void std_log_set_loglevel(unsigned int level);
extern void std_log_set_loglevel(enum __compel_log_levels level);
extern void std_log_set_start(struct timeval *tv);
extern int std_vprint_num(char *buf, int blen, int num, char **ps);
extern void std_sprintf(char output[STD_LOG_SIMPLE_CHUNK], const char *format, ...)

View File

@@ -120,7 +120,7 @@ void std_log_set_fd(int fd)
logfd = fd;
}
void std_log_set_loglevel(unsigned int level)
void std_log_set_loglevel(enum __compel_log_levels level)
{
cur_loglevel = level;
}