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

c/r: only supply --ext-mount-map for bind mounts
This commit is contained in:
Christian Brauner 2017-02-22 18:29:41 +01:00 committed by GitHub
commit 4fbf4a3172

View File

@ -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";