Make sure 'rbind' works as expected and add support for 'iversion' and
'noiversion' options.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
}
if (mountflags & MS_BIND) {
}
if (mountflags & MS_BIND) {
- if (mount(source, new, filesystemtype, MS_BIND, optstr)) {
+ if (mount(source, new, filesystemtype, MS_BIND | (mountflags & MS_REC), optstr)) {
ERROR("failed to mount -B %s %s: %m\n", source, new);
return error;
}
ERROR("failed to mount -B %s %s: %m\n", source, new);
return error;
}
mf &= ~MS_NODEV;
else if (!strcmp("nodev", tmp))
mf |= MS_NODEV;
mf &= ~MS_NODEV;
else if (!strcmp("nodev", tmp))
mf |= MS_NODEV;
+ else if (!strcmp("iversion", tmp))
+ mf |= MS_I_VERSION;
+ else if (!strcmp("noiversion", tmp))
+ mf &= ~MS_I_VERSION;
else if (!strcmp("diratime", tmp))
mf &= ~MS_NODIRATIME;
else if (!strcmp("nodiratime", tmp))
else if (!strcmp("diratime", tmp))
mf &= ~MS_NODIRATIME;
else if (!strcmp("nodiratime", tmp))