util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] libmount: mnt_resolve_path: use strcmp() only if both are canonical
@ 2014-06-27  5:17 Eric Rannaud
  2014-06-27  5:17 ` [PATCH 2/4] libmount: mnt_resolve_path: don't canonicalize fs->target for swap Eric Rannaud
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Eric Rannaud @ 2014-06-27  5:17 UTC (permalink / raw)
  To: util-linux; +Cc: Karel Zak, Eric Rannaud

Signed-off-by: Eric Rannaud <e@nanocritical.com>
---
 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 cae7ce648c31..949e718f4ca5 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.0.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-07-01  9:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-27  5:17 [PATCH 1/4] libmount: mnt_resolve_path: use strcmp() only if both are canonical Eric Rannaud
2014-06-27  5:17 ` [PATCH 2/4] libmount: mnt_resolve_path: don't canonicalize fs->target for swap Eric Rannaud
2014-07-01  8:52   ` Karel Zak
2014-06-27  5:17 ` [PATCH 3/4] libmount: mnt_resolve_target: tiptoe around active mount points Eric Rannaud
2014-07-01  9:01   ` Karel Zak
2014-06-27  5:18 ` [PATCH 4/4] findmnt: use mnt_cache_set_targets() for non-kernel table Eric Rannaud
2014-06-27  7:41   ` Karel Zak
2014-07-01  9:02   ` Karel Zak
2014-07-01  8:52 ` [PATCH 1/4] libmount: mnt_resolve_path: use strcmp() only if both are canonical Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).