summaryrefslogtreecommitdiffstats
path: root/sys-utils/mount.c
diff options
context:
space:
mode:
authorKarel Zak2012-10-24 23:59:04 +0200
committerKarel Zak2012-10-24 23:59:04 +0200
commit59414c6b4af56232e5ac218e69a0bbb3f5ba1952 (patch)
tree112e5e6d6d02087144a32648fed6cc718e12471e /sys-utils/mount.c
parentlibmount: support loopdevs in mnt_table_is_fs_mounted() (diff)
downloadkernel-qcow2-util-linux-59414c6b4af56232e5ac218e69a0bbb3f5ba1952.tar.gz
kernel-qcow2-util-linux-59414c6b4af56232e5ac218e69a0bbb3f5ba1952.tar.xz
kernel-qcow2-util-linux-59414c6b4af56232e5ac218e69a0bbb3f5ba1952.zip
mount: supports paths canonicalization for alternative fstabs
# mount --fstab /path/my.fstab has to support standard operations with paths. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/mount.c')
-rw-r--r--sys-utils/mount.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys-utils/mount.c b/sys-utils/mount.c
index a6d046ba6..ed7417788 100644
--- a/sys-utils/mount.c
+++ b/sys-utils/mount.c
@@ -898,6 +898,16 @@ int main(int argc, char **argv)
argc -= optind;
argv += optind;
+ if (fstab && !mnt_context_is_nocanonicalize(cxt)) {
+ /*
+ * We have external (context independent) fstab instance, let's
+ * make a connection between the fstab and the canonicalization
+ * cache.
+ */
+ struct libmnt_cache *cache = mnt_context_get_cache(cxt);
+ mnt_table_set_cache(fstab, cache);
+ }
+
if (!mnt_context_get_source(cxt) &&
!mnt_context_get_target(cxt) &&
!argc &&