mount /foo /bar
without entry in /etc/fstab the mount command tries all filesystems
from /{etc,proc}/filesystems. We should NOT call mount(2) more then
once if the syscall returns for example ENOENT, acceptable is only
EINVAL.
Signed-off-by: Karel Zak <kzak@redhat.com>
if (try_type && !cxt->helper) {
rc = mnt_context_prepare_helper(cxt, "mount", try_type);
- if (!rc)
+ if (rc)
return rc;
}
if (cxt->helper)
*end = '\0';
rc = do_mount(cxt, p);
p = end ? end + 1 : NULL;
+
} while (!mnt_context_get_status(cxt) && p);
free(p0);
rc = do_mount(cxt, *fp);
if (mnt_context_get_status(cxt))
break;
+ if (mnt_context_get_syscall_errno(cxt) != EINVAL)
+ break;
}
mnt_free_filesystems(filesystems);
return rc;