[CRIU] [PATCH 19/38] compel: Use compel_ prefix in uapi

Cyrill Gorcunov gorcunov at openvz.org
Tue Oct 11 09:04:09 PDT 2016


CRIU internally already refer to this name.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 compel/include/compel/log.h  |  2 +-
 compel/include/uapi/compel.h | 16 ++++++++--------
 compel/src/lib/argv.c        |  6 +++---
 compel/src/lib/log.c         |  8 ++++----
 compel/src/lib/pack.c        | 10 +++++-----
 compel/src/main.c            |  6 +++---
 6 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/compel/include/compel/log.h b/compel/include/compel/log.h
index 5f63d11bbdd4..a43b3833e031 100644
--- a/compel/include/compel/log.h
+++ b/compel/include/compel/log.h
@@ -11,7 +11,7 @@ extern unsigned int compel_log_get_loglevel(void);
 
 static inline int pr_quelled(unsigned int loglevel)
 {
-	return libcompel_log_get_loglevel() < loglevel && loglevel != LOG_MSG;
+	return compel_log_get_loglevel() < loglevel && loglevel != LOG_MSG;
 }
 
 extern void print_on_level(unsigned int loglevel, const char *format, ...);
diff --git a/compel/include/uapi/compel.h b/compel/include/uapi/compel.h
index a12e8451284e..e76e082ca1d7 100644
--- a/compel/include/uapi/compel.h
+++ b/compel/include/uapi/compel.h
@@ -17,17 +17,17 @@ typedef struct {
 /*
  * Packing objects
  */
-extern int libcompel_pack_objs(char **objs, size_t nobjs,
-			       const char *lib_path,
-			       char **libs, size_t nlibs,
-			       char *out);
+extern int compel_pack_objs(char **objs, size_t nobjs,
+			    const char *lib_path,
+			    char **libs, size_t nlibs,
+			    char *out);
 
 /*
  * Logging
  */
-extern int libcompel_log_init(const char *output);
-extern void libcompel_log_fini(void);
-extern void libcompel_log_set_loglevel(unsigned int loglevel);
-extern unsigned int libcompel_log_get_loglevel(void);
+extern int compel_log_init(const char *output);
+extern void compel_log_fini(void);
+extern void compel_log_set_loglevel(unsigned int loglevel);
+extern unsigned int compel_log_get_loglevel(void);
 
 #endif /* UAPI_COMPEL_H__ */
diff --git a/compel/src/lib/argv.c b/compel/src/lib/argv.c
index 86277ef3a80a..9d76811bd584 100644
--- a/compel/src/lib/argv.c
+++ b/compel/src/lib/argv.c
@@ -5,9 +5,9 @@
 
 #include "xmalloc.h"
 
-int libcompel_pack_argv(void *blob, size_t blob_size,
-			int argc, char **argv,
-			void **arg_p, size_t *arg_size)
+int compel_pack_argv(void *blob, size_t blob_size,
+		     int argc, char **argv,
+		     void **arg_p, size_t *arg_size)
 {
 	unsigned long *argv_packed;
 	size_t total_len;
diff --git a/compel/src/lib/log.c b/compel/src/lib/log.c
index 7c2d95c90cbd..20b5fa165277 100644
--- a/compel/src/lib/log.c
+++ b/compel/src/lib/log.c
@@ -14,7 +14,7 @@
 static unsigned int current_loglevel = DEFAULT_LOGLEVEL;
 static int logfd = STDOUT_FILENO;
 
-int libcompel_log_init(const char *output)
+int compel_log_init(const char *output)
 {
 	int new_logfd;
 
@@ -42,7 +42,7 @@ int libcompel_log_init(const char *output)
 	return 0;
 }
 
-void libcompel_log_fini(void)
+void compel_log_fini(void)
 {
 	if (logfd >= 0 && logfd != STDOUT_FILENO) {
 		close(logfd);
@@ -50,7 +50,7 @@ void libcompel_log_fini(void)
 	}
 }
 
-void libcompel_log_set_loglevel(unsigned int level)
+void compel_log_set_loglevel(unsigned int level)
 {
 	if (level == LOG_UNSET)
 		current_loglevel = DEFAULT_LOGLEVEL;
@@ -58,7 +58,7 @@ void libcompel_log_set_loglevel(unsigned int level)
 		current_loglevel = level;
 }
 
-unsigned int libcompel_log_get_loglevel(void)
+unsigned int compel_log_get_loglevel(void)
 {
 	return current_loglevel;
 }
diff --git a/compel/src/lib/pack.c b/compel/src/lib/pack.c
index d57d7ecd6a14..0a7fce409005 100644
--- a/compel/src/lib/pack.c
+++ b/compel/src/lib/pack.c
@@ -14,10 +14,10 @@
 #define COMPEL_LDS		"pack.lds.S"
 #define COMPEL_STD		"std.compel.o"
 
-int libcompel_pack_objs(char **objs, size_t nobjs,
-			const char *lib_path,
-			char **libs, size_t nlibs,
-			char *out)
+int compel_pack_objs(char **objs, size_t nobjs,
+		     const char *lib_path,
+		     char **libs, size_t nlibs,
+		     char *out)
 {
 	char command[1024] = { 0 };
 	char data[1024] = { 0 };
@@ -70,7 +70,7 @@ int libcompel_pack_objs(char **objs, size_t nobjs,
 			ret = -1;
 		ret = (pclose(f) >= 0 ? 0 : -1);
 //		if (!ret)
-//			ret = libcompel_verify_packed(out ? : COMPEL_DEFAULT_PACK_OUT);
+//			ret = compel_verify_packed(out ? : COMPEL_DEFAULT_PACK_OUT);
 	} else
 		pr_perror("Can't run pack");
 	if (ret)
diff --git a/compel/src/main.c b/compel/src/main.c
index 340dd699d46f..b53c950fcdfc 100644
--- a/compel/src/main.c
+++ b/compel/src/main.c
@@ -217,9 +217,9 @@ int main(int argc, char *argv[])
 	}
 
 	if (!strcmp(action, "pack")) {
-		return libcompel_pack_objs(argv + optind, argc - optind,
-					   libdir, libs, nlibs,
-					   opts.output_filename);
+		return compel_pack_objs(argv + optind, argc - optind,
+					libdir, libs, nlibs,
+					opts.output_filename);
 	}
 
 usage:
-- 
2.7.4



More information about the CRIU mailing list