Commit 43ce038e authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

criu dump: don't require -t

and warn if it is used.

v2: fix help text as well
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent cd891520
...@@ -1304,7 +1304,7 @@ static int prepare_task_entries() ...@@ -1304,7 +1304,7 @@ static int prepare_task_entries()
return 0; return 0;
} }
int cr_restore_tasks(pid_t pid, struct cr_options *opts) int cr_restore_tasks(struct cr_options *opts)
{ {
if (check_img_inventory() < 0) if (check_img_inventory() < 0)
return -1; return -1;
......
...@@ -316,9 +316,9 @@ int main(int argc, char *argv[]) ...@@ -316,9 +316,9 @@ int main(int argc, char *argv[])
ret = cr_dump_tasks(tree_id, &opts); ret = cr_dump_tasks(tree_id, &opts);
break; break;
case 'r': case 'r':
if (!tree_id) if (tree_id)
goto opt_pid_missing; pr_warn("Using -t with criu restore is obsoleted\n");
ret = cr_restore_tasks(tree_id, &opts); ret = cr_restore_tasks(&opts);
break; break;
case 's': case 's':
ret = cr_show(&opts, pid); ret = cr_show(&opts, pid);
...@@ -346,7 +346,7 @@ int main(int argc, char *argv[]) ...@@ -346,7 +346,7 @@ int main(int argc, char *argv[])
usage: usage:
pr_msg("\nUsage:\n"); pr_msg("\nUsage:\n");
pr_msg(" %s dump -t PID [<options>]\n", argv[0]); pr_msg(" %s dump -t PID [<options>]\n", argv[0]);
pr_msg(" %s restore -t PID [<options>]\n", argv[0]); pr_msg(" %s restore [<options>]\n", argv[0]);
pr_msg(" %s show (-D DIR)|(-f FILE) [<options>]\n", argv[0]); pr_msg(" %s show (-D DIR)|(-f FILE) [<options>]\n", argv[0]);
pr_msg(" %s check [--ms]\n", argv[0]); pr_msg(" %s check [--ms]\n", argv[0]);
pr_msg(" %s exec -p PID <syscall-string>\n", argv[0]); pr_msg(" %s exec -p PID <syscall-string>\n", argv[0]);
......
...@@ -223,7 +223,7 @@ extern struct cr_fdset *glob_fdset; ...@@ -223,7 +223,7 @@ extern struct cr_fdset *glob_fdset;
extern struct cr_options opts; extern struct cr_options opts;
int cr_dump_tasks(pid_t pid, const struct cr_options *opts); int cr_dump_tasks(pid_t pid, const struct cr_options *opts);
int cr_restore_tasks(pid_t pid, struct cr_options *opts); int cr_restore_tasks(struct cr_options *opts);
int cr_show(struct cr_options *opts, int pid); int cr_show(struct cr_options *opts, int pid);
int convert_to_elf(char *elf_path, int fd_core); int convert_to_elf(char *elf_path, int fd_core);
int cr_check(void); int cr_check(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment