This is how mnt_table_find_target() does it. It makes sense because
@fs->target is "none" for swap and is never a sensible match for a
user-specified target.
Signed-off-by: Eric Rannaud <e@nanocritical.com>
rc = (cn && mnt_fs_streq_target(fs, cn));
/* 3) - canonicalized and canonicalized */
- if (!rc && cn && !mnt_fs_is_kernel(fs)) {
+ if (!rc && cn && !mnt_fs_is_kernel(fs) && !mnt_fs_is_swaparea(fs)) {
char *tcn = mnt_resolve_path(fs->target, cache);
rc = (tcn && strcmp(cn, tcn) == 0);
}