[CRIU] [crtools-bot for Cyrill Gorcunov ] logfd: Distinguish functions which do setup logdf

Cyrill Gorcunov gorcunov at openvz.org
Thu Mar 1 16:05:43 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 95f770b61c29dc9420d77461b86ae7476dc958f9
Author: Cyrill Gorcunov <gorcunov at openvz.org>
Date:   Thu Mar 1 18:15:58 2012 +0400

    logfd: Distinguish functions which do setup logdf
    
    We have a few helper functions which all do setup
    logfd but in different program flow context. So
    rename them for grepability.
    
    Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
    Acked-by: Pavel Emelyanov <xemul at parallels.com>
---
 include/restorer-log.h |    2 +-
 parasite.c             |    4 ++--
 restorer-log.c         |    2 +-
 restorer.c             |    2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/restorer-log.h b/include/restorer-log.h
index f038dd0..7a2316f 100644
--- a/include/restorer-log.h
+++ b/include/restorer-log.h
@@ -7,5 +7,5 @@ extern void write_num_n(long num);
 extern void write_num(long num);
 extern void write_string_n(char *str);
 extern void write_string(char *str);
-extern void set_logfd(int fd);
+extern void restorer_set_logfd(int fd);
 #endif
diff --git a/parasite.c b/parasite.c
index be39afa..fe5a325 100644
--- a/parasite.c
+++ b/parasite.c
@@ -544,7 +544,7 @@ static int init(struct parasite_init_args *args)
 	return ret;
 }
 
-static int set_logfd(void)
+static int parasite_set_logfd(void)
 {
 	logfd = recv_fd(tsock);
 	return logfd;
@@ -574,7 +574,7 @@ static int __used parasite_service(unsigned long cmd, void *args)
 	case PARASITE_CMD_FINI:
 		return fini();
 	case PARASITE_CMD_SET_LOGFD:
-		return set_logfd();
+		return parasite_set_logfd();
 	case PARASITE_CMD_DUMPPAGES_INIT:
 		return dump_pages_init((parasite_status_t *) args);
 	case PARASITE_CMD_DUMPPAGES_FINI:
diff --git a/restorer-log.c b/restorer-log.c
index 858e360..634513e 100644
--- a/restorer-log.c
+++ b/restorer-log.c
@@ -3,7 +3,7 @@
 
 static int logfd;
 
-void set_logfd(int fd)
+void restorer_set_logfd(int fd)
 {
 	logfd = fd;
 }
diff --git a/restorer.c b/restorer.c
index 552f741..ecffd7e 100644
--- a/restorer.c
+++ b/restorer.c
@@ -352,7 +352,7 @@ long restore_task(struct task_restore_core_args *args)
 	act.rt_sa_handler = sigchld_handler;
 	sys_sigaction(SIGCHLD, &act, NULL);
 
-	set_logfd(args->logfd);
+	restorer_set_logfd(args->logfd);
 
 	core_entry	= first_on_heap(core_entry, args->mem_zone.heap);
 	vma_entry	= next_on_heap(vma_entry, core_entry);


More information about the CRIU mailing list