]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: mnt_resolve_path: use strcmp() only if both are canonical
authorEric Rannaud <e@nanocritical.com>
Fri, 27 Jun 2014 05:17:16 +0000 (22:17 -0700)
committerKarel Zak <kzak@redhat.com>
Tue, 1 Jul 2014 07:32:09 +0000 (09:32 +0200)
Signed-off-by: Eric Rannaud <e@nanocritical.com>
libmount/src/fs.c

index cae7ce648c31fa1ee6f8dc13b1e24561eb3cdd07..949e718f4ca5365ce489f085cbbab49b46ef41a6 100644 (file)
@@ -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)) {