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@xxxxxxxxxxxxxxxx> --- 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 949e718f4ca5..21ef0f7479fd 100644 --- a/libmount/src/fs.c +++ b/libmount/src/fs.c @@ -1437,7 +1437,7 @@ int mnt_fs_match_target(struct libmnt_fs *fs, const char *target, 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); } -- 2.0.1 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html