[CRIU] [PATCH] Remove criu exec code

Pavel Emelyanov xemul at virtuozzo.com
Fri Feb 10 02:27:40 PST 2017


It's now obsoleted by compel library.
Maybe-TODO: Add compel tool exec action?

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 compel/include/infect-priv.h |   8 --
 compel/src/lib/infect.c      |   2 +-
 criu/Makefile.crtools        |   1 -
 criu/cr-exec.c               | 198 -------------------------------------------
 criu/crtools.c               |  11 +--
 5 files changed, 3 insertions(+), 217 deletions(-)
 delete mode 100644 criu/cr-exec.c

diff --git a/compel/include/infect-priv.h b/compel/include/infect-priv.h
index 99f9ada..cf0ce3a 100644
--- a/compel/include/infect-priv.h
+++ b/compel/include/infect-priv.h
@@ -53,14 +53,6 @@ struct parasite_thread_ctl {
 struct ctl_msg;
 int parasite_wait_ack(int sockfd, unsigned int cmd, struct ctl_msg *m);
 
-/* XXX -- remove with cr-exec.c */
-extern int compel_map_exchange(struct parasite_ctl *ctl, unsigned long size);
-extern int compel_syscall(struct parasite_ctl *ctl, int nr, long *ret,
-			  unsigned long arg1, unsigned long arg2,
-			  unsigned long arg3, unsigned long arg4,
-			  unsigned long arg5, unsigned long arg6);
-
-
 extern void parasite_setup_regs(unsigned long new_ip, void *stack, user_regs_struct_t *regs);
 extern void *remote_mmap(struct parasite_ctl *ctl,
 		void *addr, size_t length, int prot,
diff --git a/compel/src/lib/infect.c b/compel/src/lib/infect.c
index 3938d84..717cd3c 100644
--- a/compel/src/lib/infect.c
+++ b/compel/src/lib/infect.c
@@ -837,7 +837,7 @@ void compel_relocs_apply(void *mem, void *vbase, size_t size, compel_reloc_t *el
 	}
 }
 
-int compel_map_exchange(struct parasite_ctl *ctl, unsigned long size)
+static int compel_map_exchange(struct parasite_ctl *ctl, unsigned long size)
 {
 	int ret;
 
diff --git a/criu/Makefile.crtools b/criu/Makefile.crtools
index e095d01..b018ccb 100644
--- a/criu/Makefile.crtools
+++ b/criu/Makefile.crtools
@@ -14,7 +14,6 @@ obj-y			+= cr-check.o
 obj-y			+= cr-dedup.o
 obj-y			+= cr-dump.o
 obj-y			+= cr-errno.o
-#obj-y			+= cr-exec.o
 obj-y			+= cr-restore.o
 obj-y			+= cr-service.o
 obj-y			+= crtools.o
diff --git a/criu/cr-exec.c b/criu/cr-exec.c
deleted file mode 100644
index ca76466..0000000
diff --git a/criu/crtools.c b/criu/crtools.c
index cce8073..e8aa42e 100644
--- a/criu/crtools.c
+++ b/criu/crtools.c
@@ -779,15 +779,10 @@ int main(int argc, char *argv[], char *envp[])
 	if (!strcmp(argv[optind], "check"))
 		return cr_check() != 0;
 
-#if 0
 	if (!strcmp(argv[optind], "exec")) {
-		if (!pid)
-			pid = tree_id; /* old usage */
-		if (!pid)
-			goto opt_pid_missing;
-		return cr_exec(pid, argv + optind + 1) != 0;
+		pr_msg("The \"exec\" action is deprecated by the Compel library.\n");
+		return -1;
 	}
-#endif
 
 	if (!strcmp(argv[optind], "page-server"))
 		return cr_page_server(opts.daemon_mode, false, -1) != 0;
@@ -816,7 +811,6 @@ usage:
 "  criu dump|pre-dump -t PID [<options>]\n"
 "  criu restore [<options>]\n"
 "  criu check [--feature FEAT]\n"
-"  criu exec -p PID <syscall-string>\n"
 "  criu page-server\n"
 "  criu service [<options>]\n"
 "  criu dedup\n"
@@ -827,7 +821,6 @@ usage:
 "  pre-dump       pre-dump task(s) minimizing their frozen time\n"
 "  restore        restore a process/tree\n"
 "  check          checks whether the kernel support is up-to-date\n"
-"  exec           execute a system call by other task\n"
 "  page-server    launch page server\n"
 "  service        launch service\n"
 "  dedup          remove duplicates in memory dump\n"
-- 
2.5.0


More information about the CRIU mailing list