Commit 1becda46 by Christian Brauner

Merge pull request #908 from tych0/fix-907

Fix 907
parents f036e5ce b7088add
...@@ -868,12 +868,12 @@ static bool do_dump(struct lxc_container *c, char *mode, char *directory, ...@@ -868,12 +868,12 @@ static bool do_dump(struct lxc_container *c, char *mode, char *directory,
} }
} }
bool pre_dump(struct lxc_container *c, char *directory, bool verbose, char *predump_dir) bool __criu_pre_dump(struct lxc_container *c, char *directory, bool verbose, char *predump_dir)
{ {
return do_dump(c, "pre-dump", directory, false, verbose, predump_dir); return do_dump(c, "pre-dump", directory, false, verbose, predump_dir);
} }
bool dump(struct lxc_container *c, char *directory, bool stop, bool verbose, char *predump_dir) bool __criu_dump(struct lxc_container *c, char *directory, bool stop, bool verbose, char *predump_dir)
{ {
char path[PATH_MAX]; char path[PATH_MAX];
int ret; int ret;
...@@ -890,7 +890,7 @@ bool dump(struct lxc_container *c, char *directory, bool stop, bool verbose, cha ...@@ -890,7 +890,7 @@ bool dump(struct lxc_container *c, char *directory, bool stop, bool verbose, cha
return do_dump(c, "dump", directory, stop, verbose, predump_dir); return do_dump(c, "dump", directory, stop, verbose, predump_dir);
} }
bool restore(struct lxc_container *c, char *directory, bool verbose) bool __criu_restore(struct lxc_container *c, char *directory, bool verbose)
{ {
pid_t pid; pid_t pid;
int status, nread; int status, nread;
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
#include <lxc/lxccontainer.h> #include <lxc/lxccontainer.h>
bool pre_dump(struct lxc_container *c, char *directory, bool verbose, char *predump_dir); bool __criu_pre_dump(struct lxc_container *c, char *directory, bool verbose, char *predump_dir);
bool dump(struct lxc_container *c, char *directory, bool stop, bool verbose, char *predump_dir); bool __criu_dump(struct lxc_container *c, char *directory, bool stop, bool verbose, char *predump_dir);
bool restore(struct lxc_container *c, char *directory, bool verbose); bool __criu_restore(struct lxc_container *c, char *directory, bool verbose);
#endif #endif
...@@ -121,7 +121,7 @@ Options :\n\ ...@@ -121,7 +121,7 @@ Options :\n\
.checker = my_checker, .checker = my_checker,
}; };
bool checkpoint(struct lxc_container *c) static bool checkpoint(struct lxc_container *c)
{ {
bool ret; bool ret;
...@@ -142,7 +142,7 @@ bool checkpoint(struct lxc_container *c) ...@@ -142,7 +142,7 @@ bool checkpoint(struct lxc_container *c)
return true; return true;
} }
bool restore_finalize(struct lxc_container *c) static bool restore_finalize(struct lxc_container *c)
{ {
bool ret = c->restore(c, checkpoint_dir, verbose); bool ret = c->restore(c, checkpoint_dir, verbose);
if (!ret) { if (!ret) {
...@@ -153,7 +153,7 @@ bool restore_finalize(struct lxc_container *c) ...@@ -153,7 +153,7 @@ bool restore_finalize(struct lxc_container *c)
return ret; return ret;
} }
bool restore(struct lxc_container *c) static bool restore(struct lxc_container *c)
{ {
if (c->is_running(c)) { if (c->is_running(c)) {
fprintf(stderr, "%s is running, not restoring.\n", my_args.name); fprintf(stderr, "%s is running, not restoring.\n", my_args.name);
......
...@@ -3960,13 +3960,13 @@ static int do_lxcapi_migrate(struct lxc_container *c, unsigned int cmd, ...@@ -3960,13 +3960,13 @@ static int do_lxcapi_migrate(struct lxc_container *c, unsigned int cmd,
switch (cmd) { switch (cmd) {
case MIGRATE_PRE_DUMP: case MIGRATE_PRE_DUMP:
ret = !pre_dump(c, opts->directory, opts->verbose, opts->predump_dir); ret = !__criu_pre_dump(c, opts->directory, opts->verbose, opts->predump_dir);
break; break;
case MIGRATE_DUMP: case MIGRATE_DUMP:
ret = !dump(c, opts->directory, opts->stop, opts->verbose, opts->predump_dir); ret = !__criu_dump(c, opts->directory, opts->stop, opts->verbose, opts->predump_dir);
break; break;
case MIGRATE_RESTORE: case MIGRATE_RESTORE:
ret = !restore(c, opts->directory, opts->verbose); ret = !__criu_restore(c, opts->directory, opts->verbose);
break; break;
default: default:
ERROR("invalid migrate command %u", cmd); ERROR("invalid migrate command %u", cmd);
......
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