[CRIU] [PATCH 6/8] compel: Move log-related stuff into include/uapi/log.h

Pavel Emelyanov xemul at virtuozzo.com
Mon Nov 14 05:06:02 PST 2016


This cleans up the main-entry header compel.h

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 compel/include/uapi/compel.h | 8 +-------
 compel/include/uapi/log.h    | 7 +++++++
 2 files changed, 8 insertions(+), 7 deletions(-)
 create mode 100644 compel/include/uapi/log.h

diff --git a/compel/include/uapi/compel.h b/compel/include/uapi/compel.h
index 3554c15..a3faa18 100644
--- a/compel/include/uapi/compel.h
+++ b/compel/include/uapi/compel.h
@@ -17,13 +17,7 @@ typedef struct {
 	long		value;
 } compel_reloc_t;
 
-/*
- * Logging
- */
-typedef void (*compel_log_fn)(unsigned int lvl, const char *fmt, va_list parms);
-extern void compel_log_init(compel_log_fn log_fn, unsigned int level);
-extern unsigned int compel_log_get_loglevel(void);
-
+#include <compel/log.h>
 #include <compel/infect-util.h>
 #include <compel/infect-rpc.h>
 #include <compel/infect.h>
diff --git a/compel/include/uapi/log.h b/compel/include/uapi/log.h
new file mode 100644
index 0000000..cd3bf2a
--- /dev/null
+++ b/compel/include/uapi/log.h
@@ -0,0 +1,7 @@
+#ifndef __COMPEL_UAPI_LOG_H__
+#define __COMPEL_UAPI_LOG_H__
+#include <compel/loglevels.h>
+typedef void (*compel_log_fn)(unsigned int lvl, const char *fmt, va_list parms);
+extern void compel_log_init(compel_log_fn log_fn, unsigned int level);
+extern unsigned int compel_log_get_loglevel(void);
+#endif
-- 
2.5.0



More information about the CRIU mailing list