summaryrefslogtreecommitdiffstats
path: root/libmount/src/cache.c
diff options
context:
space:
mode:
authorKarel Zak2016-08-08 17:23:54 +0200
committerKarel Zak2016-08-08 17:23:54 +0200
commitd4e89dea4e8e95cee0cede39dc77618a181b8d19 (patch)
tree00c24b4795795930d6bc618ebb1e9d9b68819992 /libmount/src/cache.c
parentuuidd: remove unnecessary pidpile path variable (diff)
downloadkernel-qcow2-util-linux-d4e89dea4e8e95cee0cede39dc77618a181b8d19.tar.gz
kernel-qcow2-util-linux-d4e89dea4e8e95cee0cede39dc77618a181b8d19.tar.xz
kernel-qcow2-util-linux-d4e89dea4e8e95cee0cede39dc77618a181b8d19.zip
libmount: ignore redundant slashes
///aaa/bbb and /aaa/bbb/ are the same paths. This is important especially with NFS where number of slashes are not the same in the /proc/self/mountinfo and fstab or utab. The regular URI is euler://tmp but /proc contains euler:/tmp Reported-by: Ales Novak <alnovak@suse.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/cache.c')
-rw-r--r--libmount/src/cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmount/src/cache.c b/libmount/src/cache.c
index b83706a37..04dcb7fb3 100644
--- a/libmount/src/cache.c
+++ b/libmount/src/cache.c
@@ -248,7 +248,7 @@ static const char *cache_find_path(struct libmnt_cache *cache, const char *path)
struct mnt_cache_entry *e = &cache->ents[i];
if (!(e->flag & MNT_CACHE_ISPATH))
continue;
- if (streq_except_trailing_slash(path, e->key))
+ if (streq_paths(path, e->key))
return e->value;
}
return NULL;