Skip to content

Commit

Permalink
Remove criu exec code
Browse files Browse the repository at this point in the history
It's now obsoleted by compel library.
Maybe-TODO: Add compel tool exec action?

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
  • Loading branch information
xemul authored and avagin committed Mar 15, 2017
1 parent e73434c commit 909590a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 222 deletions.
8 changes: 0 additions & 8 deletions compel/include/infect-priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion compel/src/lib/infect.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,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;

Expand Down
1 change: 0 additions & 1 deletion criu/Makefile.crtools
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
198 changes: 0 additions & 198 deletions criu/cr-exec.c

This file was deleted.

20 changes: 6 additions & 14 deletions criu/crtools.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,11 @@ int main(int argc, char *argv[], char *envp[])
goto usage;
}

if (!strcmp(argv[optind], "exec")) {
pr_msg("The \"exec\" action is deprecated by the Compel library.\n");
return -1;
}

has_sub_command = (argc - optind) > 1;

if (has_exec_cmd) {
Expand All @@ -671,8 +676,7 @@ int main(int argc, char *argv[], char *envp[])
opts.exec_cmd[argc - optind - 1] = NULL;
} else {
/* No subcommands except for cpuinfo and restore --exec-cmd */
if ((strcmp(argv[optind], "cpuinfo") && strcmp(argv[optind], "exec"))
&& has_sub_command) {
if (strcmp(argv[optind], "cpuinfo") && has_sub_command) {
pr_msg("Error: excessive parameter%s for command %s\n",
(argc - optind) > 2 ? "s" : "", argv[optind]);
goto usage;
Expand Down Expand Up @@ -765,16 +769,6 @@ 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;
}
#endif

if (!strcmp(argv[optind], "page-server"))
return cr_page_server(opts.daemon_mode, -1) != 0;

Expand Down Expand Up @@ -802,7 +796,6 @@ int main(int argc, char *argv[], char *envp[])
" 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"
Expand All @@ -812,7 +805,6 @@ int main(int argc, char *argv[], char *envp[])
" 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"
Expand Down

0 comments on commit 909590a

Please sign in to comment.