diff options
author | Petr Uzel | 2011-11-08 16:25:01 +0100 |
---|---|---|
committer | Karel Zak | 2011-11-08 16:25:01 +0100 |
commit | b106d052383083b80c0dc41f1555d2661db00374 (patch) | |
tree | 1a47a77f18b6935b7c67a219617091951e236d94 /libmount/src/tab_parse.c | |
parent | lib,loopdev: add LOOP_CTL_GET_FREE support (diff) | |
download | kernel-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/tab_parse.c')
-rw-r--r-- | libmount/src/tab_parse.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index 18a124345..4ee590889 100644 --- a/libmount/src/tab_parse.c +++ b/libmount/src/tab_parse.c @@ -14,6 +14,7 @@ #include "mangle.h" #include "mountP.h" #include "pathnames.h" +#include "strutils.h" static inline char *skip_spaces(char *s) { @@ -654,8 +655,14 @@ static struct libmnt_fs *mnt_table_merge_user_fs(struct libmnt_table *tb, struct if (fs->flags & MNT_FS_MERGED) continue; - if (s && t && r && !strcmp(t, target) && - !strcmp(s, src) && !strcmp(r, root)) + /* + * Note that kernel can add tailing slash to the network + * filesystem source path + */ + if (s && t && r && + strcmp(t, target) == 0 && + streq_except_trailing_slash(s, src) && + strcmp(r, root) == 0) break; } |