2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-01 06:45:35 +00:00

criu dump: don't require -t

and warn if it is used.

v2: fix help text as well

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Kir Kolyshkin
2013-05-08 13:41:42 +04:00
committed by Pavel Emelyanov
parent cd8915202e
commit 43ce038e6e
3 changed files with 6 additions and 6 deletions

View File

@@ -1304,7 +1304,7 @@ static int prepare_task_entries()
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)
return -1;

View File

@@ -316,9 +316,9 @@ int main(int argc, char *argv[])
ret = cr_dump_tasks(tree_id, &opts);
break;
case 'r':
if (!tree_id)
goto opt_pid_missing;
ret = cr_restore_tasks(tree_id, &opts);
if (tree_id)
pr_warn("Using -t with criu restore is obsoleted\n");
ret = cr_restore_tasks(&opts);
break;
case 's':
ret = cr_show(&opts, pid);
@@ -346,7 +346,7 @@ int main(int argc, char *argv[])
usage:
pr_msg("\nUsage:\n");
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 check [--ms]\n", argv[0]);
pr_msg(" %s exec -p PID <syscall-string>\n", argv[0]);

View File

@@ -223,7 +223,7 @@ extern struct cr_fdset *glob_fdset;
extern 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 convert_to_elf(char *elf_path, int fd_core);
int cr_check(void);