In some cases mounts could still fail eventhough 'nofail' was set.
Make sure to always return successfull also in those cases.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
fd = creat(new, 0644);
if (fd == -1) {
ERROR("creat(%s) failed: %m\n", new);
fd = creat(new, 0644);
if (fd == -1) {
ERROR("creat(%s) failed: %m\n", new);
if (mountflags & MS_BIND) {
if (mount(source, new, filesystemtype, MS_BIND, optstr)) {
ERROR("failed to mount -B %s %s: %m\n", source, new);
if (mountflags & MS_BIND) {
if (mount(source, new, filesystemtype, MS_BIND, optstr)) {
ERROR("failed to mount -B %s %s: %m\n", source, new);
}
mountflags |= MS_REMOUNT;
}
if (mount(source, new, filesystemtype, mountflags, optstr)) {
ERROR("failed to mount %s %s: %m\n", source, new);
}
mountflags |= MS_REMOUNT;
}
if (mount(source, new, filesystemtype, mountflags, optstr)) {
ERROR("failed to mount %s %s: %m\n", source, new);
}
DEBUG("mount %s%s %s (%s)\n", (mountflags & MS_BIND)?"-B ":"", source, new,
}
DEBUG("mount %s%s %s (%s)\n", (mountflags & MS_BIND)?"-B ":"", source, new,