Commit 4fbf4a31 by Christian Brauner Committed by GitHub

Merge pull request #1441 from tych0/only-do-bind-mounts

c/r: only supply --ext-mount-map for bind mounts
parents f7938476 19d2422b
...@@ -334,8 +334,18 @@ static void exec_criu(struct criu_opts *opts) ...@@ -334,8 +334,18 @@ static void exec_criu(struct criu_opts *opts)
goto err; goto err;
while (getmntent_r(mnts, &mntent, buf, sizeof(buf))) { while (getmntent_r(mnts, &mntent, buf, sizeof(buf))) {
char *fmt, *key, *val; char *fmt, *key, *val, *mntdata;
char arg[2 * PATH_MAX + 2]; char arg[2 * PATH_MAX + 2];
unsigned long flags;
if (parse_mntopts(mntent.mnt_opts, &flags, &mntdata) < 0)
goto err;
free(mntdata);
/* only add --ext-mount-map for actual bind mounts */
if (!(flags & MS_BIND))
continue;
if (strcmp(opts->action, "dump") == 0) { if (strcmp(opts->action, "dump") == 0) {
fmt = "/%s:%s"; fmt = "/%s:%s";
......
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