From ab131f00a2a5b81fbdf362b0b452291298523031 Mon Sep 17 00:00:00 2001 From: Eric Rannaud Date: Thu, 26 Jun 2014 22:17:16 -0700 Subject: [PATCH] libmount: mnt_resolve_path: use strcmp() only if both are canonical Signed-off-by: Eric Rannaud --- libmount/src/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmount/src/fs.c b/libmount/src/fs.c index cae7ce648c..949e718f4c 100644 --- a/libmount/src/fs.c +++ b/libmount/src/fs.c @@ -1434,7 +1434,7 @@ int mnt_fs_match_target(struct libmnt_fs *fs, const char *target, if (!rc && cache) { /* 2) - canonicalized and non-canonicalized */ char *cn = mnt_resolve_path(target, cache); - rc = (cn && strcmp(cn, fs->target) == 0); + rc = (cn && mnt_fs_streq_target(fs, cn)); /* 3) - canonicalized and canonicalized */ if (!rc && cn && !mnt_fs_is_kernel(fs)) { -- 2.47.3