summaryrefslogtreecommitdiffstats
path: root/libmount/src/context_mount.c
diff options
context:
space:
mode:
authorKarel Zak2012-01-02 15:00:27 +0100
committerKarel Zak2012-01-02 15:00:27 +0100
commitc70d9d768bbe291ad29f29200340d1f4d8bbf30f (patch)
tree0878a5b06223146a9bbe6a48109cf348df75218d /libmount/src/context_mount.c
parentmount: don't canonicalize the source of a pseudofs (diff)
downloadkernel-qcow2-util-linux-c70d9d768bbe291ad29f29200340d1f4d8bbf30f.tar.gz
kernel-qcow2-util-linux-c70d9d768bbe291ad29f29200340d1f4d8bbf30f.tar.xz
kernel-qcow2-util-linux-c70d9d768bbe291ad29f29200340d1f4d8bbf30f.zip
libmount: consolidate MNT_FS_* code
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_mount.c')
-rw-r--r--libmount/src/context_mount.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
index 8fba9c6be..f86b3f761 100644
--- a/libmount/src/context_mount.c
+++ b/libmount/src/context_mount.c
@@ -515,7 +515,7 @@ int mnt_context_prepare_mount(struct libmnt_context *cxt)
assert(cxt->helper_exec_status == 1);
assert(cxt->syscall_status == 1);
- if (!cxt || !cxt->fs || (cxt->fs->flags & MNT_FS_SWAP))
+ if (!cxt || !cxt->fs || mnt_fs_is_swaparea(cxt->fs))
return -EINVAL;
if (!mnt_fs_get_source(cxt->fs) && !mnt_fs_get_target(cxt->fs))
return -EINVAL;
@@ -726,10 +726,10 @@ int mnt_context_next_mount(struct libmnt_context *cxt,
DBG(CXT, mnt_debug_h(cxt, "next-mount: trying %s", tgt));
/* ignore swap */
- if (((*fs)->flags & MNT_FS_SWAP) ||
+ if (mnt_fs_is_swaparea(*fs) ||
/* ignore root filesystem */
- (tgt && (strcmp(tgt, "/") == 0 || strcmp(tgt, "root") == 0)) ||
+ (tgt && (strcmp(tgt, "/") == 0 || strcmp(tgt, "root") == 0)) ||
/* ignore noauto filesystems */
(o && mnt_optstr_get_option(o, "noauto", NULL, NULL) == 0) ||