summaryrefslogtreecommitdiffstats
path: root/libmount/src/fs.c
diff options
context:
space:
mode:
authorPetr Uzel2011-11-08 16:25:01 +0100
committerKarel Zak2011-11-08 16:25:01 +0100
commitb106d052383083b80c0dc41f1555d2661db00374 (patch)
tree1a47a77f18b6935b7c67a219617091951e236d94 /libmount/src/fs.c
parentlib,loopdev: add LOOP_CTL_GET_FREE support (diff)
downloadkernel-qcow2-util-linux-b106d052383083b80c0dc41f1555d2661db00374.tar.gz
kernel-qcow2-util-linux-b106d052383083b80c0dc41f1555d2661db00374.tar.xz
kernel-qcow2-util-linux-b106d052383083b80c0dc41f1555d2661db00374.zip
libmount: ignore tailing slash in netfs source paths
Addresses: https://bugzilla.novell.com/show_bug.cgi?id=728480 Signed-off-by: Petr Uzel <petr.uzel@suse.cz> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/fs.c')
-rw-r--r--libmount/src/fs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libmount/src/fs.c b/libmount/src/fs.c
index 1c7068dd0..26560d161 100644
--- a/libmount/src/fs.c
+++ b/libmount/src/fs.c
@@ -16,6 +16,7 @@
#include <stddef.h>
#include "mountP.h"
+#include "strutils.h"
/**
* mnt_new_fs:
@@ -1142,7 +1143,7 @@ int mnt_fs_match_source(struct libmnt_fs *fs, const char *source, struct libmnt_
return 0;
/* 1) native paths/tags */
- if (!strcmp(source, fs->source))
+ if (streq_except_trailing_slash(source, fs->source))
return 1;
if (!cache)
@@ -1156,7 +1157,7 @@ int mnt_fs_match_source(struct libmnt_fs *fs, const char *source, struct libmnt_
/* 2) canonicalized and native */
src = mnt_fs_get_srcpath(fs);
- if (src && !strcmp(cn, src))
+ if (src && streq_except_trailing_slash(cn, src))
return 1;
/* 3) canonicalized and canonicalized */