summaryrefslogtreecommitdiff
path: root/testing/util-linux/libmount-canonicalize-targets-from-fstab-on-mount-a.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/util-linux/libmount-canonicalize-targets-from-fstab-on-mount-a.patch')
-rw-r--r--testing/util-linux/libmount-canonicalize-targets-from-fstab-on-mount-a.patch55
1 files changed, 0 insertions, 55 deletions
diff --git a/testing/util-linux/libmount-canonicalize-targets-from-fstab-on-mount-a.patch b/testing/util-linux/libmount-canonicalize-targets-from-fstab-on-mount-a.patch
deleted file mode 100644
index 46ff55260..000000000
--- a/testing/util-linux/libmount-canonicalize-targets-from-fstab-on-mount-a.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 6eba938376c2c870d9258ef9d7b6a3690cfa78dd Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak@redhat.com>
-Date: Fri, 24 Feb 2012 22:52:45 +0100
-Subject: [PATCH 11/12] libmount: canonicalize targets from fstab on mount -a
-
-Signed-off-by: Karel Zak <kzak@redhat.com>
----
- libmount/src/tab.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/libmount/src/tab.c b/libmount/src/tab.c
-index 66a9e4d..21b05c7 100644
---- a/libmount/src/tab.c
-+++ b/libmount/src/tab.c
-@@ -830,8 +830,8 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
- {
- char *root = NULL;
- struct libmnt_fs *src_fs;
-- const char *src, *tgt;
-- char *xsrc = NULL;
-+ const char *src;
-+ char *xsrc = NULL, *tgt;
- int flags = 0, rc = 0;
-
- assert(tb);
-@@ -852,7 +852,7 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
- src = xsrc = mnt_resolve_spec(mnt_fs_get_source(fstab_fs),
- tb->cache);
-
-- tgt = mnt_fs_get_target(fstab_fs);
-+ tgt = mnt_resolve_path(mnt_fs_get_target(fstab_fs), tb->cache);
-
- if (tgt && src && root) {
- struct libmnt_iter itr;
-@@ -870,7 +870,7 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
- * network filesystem source paths.
- */
- if (t && s && r &&
-- strcmp(t, tgt) == 0 &&
-+ streq_except_trailing_slash(t, tgt) &&
- streq_except_trailing_slash(s, src) &&
- strcmp(r, root) == 0)
- break;
-@@ -881,6 +881,8 @@ int mnt_table_is_fs_mounted(struct libmnt_table *tb, struct libmnt_fs *fstab_fs)
-
- if (xsrc && !tb->cache)
- free(xsrc);
-+ if (!tb->cache)
-+ free(tgt);
-
- free(root);
- return rc;
---
-1.7.9.2
-