mnt_table_find_target() canonicalizes paths by libmnt cache, but it's
overkill if the difference between paths is tailing slash only.
Signed-off-by: Karel Zak <kzak@redhat.com>
/* native @target */
mnt_reset_iter(&itr, direction);
while(mnt_table_next_fs(tb, &itr, &fs) == 0) {
- if (fs->target && strcmp(fs->target, path) == 0)
+ if (fs->target && streq_except_trailing_slash(fs->target, path))
return fs;
}
if (!tb->cache || !(cn = mnt_resolve_path(path, tb->cache)))