From 45e8cdba91799c4149c9c7f20bfa7606bf295f7f Mon Sep 17 00:00:00 2001 From: Eric Rannaud Date: Thu, 26 Jun 2014 22:17:17 -0700 Subject: libmount: mnt_resolve_path: don't canonicalize fs->target for swap 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 --- libmount/src/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmount/src/fs.c') diff --git a/libmount/src/fs.c b/libmount/src/fs.c index 949e718f4..21ef0f747 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); } -- cgit v1.2.3-55-g7522