[PATCH] criu dump: don't require -t
Kir Kolyshkin
kir at openvz.org
Tue May 7 16:46:09 EDT 2013
and warn if it is used.
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
cr-restore.c | 2 +-
crtools.c | 6 +++---
include/crtools.h | 2 +-
3 files changed, 5 insertions(+), 5 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..b9c2e7d 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);
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
--------------010906080707060809030900--
More information about the CRIU
mailing list