[CRIU] [PATCH v2] criu dump: don't require -t
Kir Kolyshkin
kir at openvz.org
Tue May 7 18:31:53 EDT 2013
and warn if it is used.
v2: fix help text as well
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
cr-restore.c | 2 +-
crtools.c | 8 ++++----
include/crtools.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/cr-restore.c b/cr-restore.c
index 238cb77..2c47fd5 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -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;
diff --git a/crtools.c b/crtools.c
index 5cdf8e3..7b05618 100644
--- a/crtools.c
+++ b/crtools.c
@@ -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]);
diff --git a/include/crtools.h b/include/crtools.h
index f679e2d..1499546 100644
--- a/include/crtools.h
+++ b/include/crtools.h
@@ -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);
--
1.8.1.4
More information about the CRIU
mailing list