[1/8] compel/log: Use enum as parameter for std_log_set_loglevel()

Submitted by Dmitry Safonov on July 25, 2019, 10:01 p.m.

Details

Message ID 20190725220114.16977-2-dima@arista.com
State Accepted
Series "vdso: Use gettimeofday() from vdso for timings"
Headers show

Commit Message

Dmitry Safonov July 25, 2019, 10:01 p.m.
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>
---
 compel/plugins/include/uapi/std/log.h | 4 +++-
 compel/plugins/std/log.c              | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/compel/plugins/include/uapi/std/log.h b/compel/plugins/include/uapi/std/log.h
index fbd1803bb247..7b27b12508c1 100644
--- a/compel/plugins/include/uapi/std/log.h
+++ b/compel/plugins/include/uapi/std/log.h
@@ -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, ...)
diff --git a/compel/plugins/std/log.c b/compel/plugins/std/log.c
index 403ea46f78b0..06b9894aea38 100644
--- a/compel/plugins/std/log.c
+++ b/compel/plugins/std/log.c
@@ -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;
 }