From 5dfc98439280aedd3df095276df5e20f1bf7a2d2 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 27 Jun 2011 13:31:48 +0200 Subject: [PATCH] libmount: minor fixes Signed-off-by: Karel Zak --- libmount/src/context_umount.c | 4 ++-- libmount/src/fs.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libmount/src/context_umount.c b/libmount/src/context_umount.c index e10af52f2c..184a51efe0 100644 --- a/libmount/src/context_umount.c +++ b/libmount/src/context_umount.c @@ -163,7 +163,7 @@ static int prepare_helper_from_options(struct libmnt_context *cxt, if (!opts) return 0; - if (mnt_optstr_get_option((char *) opts, name, &suffix, &valsz)) + if (mnt_optstr_get_option(opts, name, &suffix, &valsz)) return 0; suffix = strndup(suffix, valsz); @@ -305,7 +305,7 @@ static int evaluate_permissions(struct libmnt_context *cxt) /* get options from mtab */ optstr = mnt_fs_get_user_options(cxt->fs); - if (optstr && !mnt_optstr_get_option((char *) optstr, + if (optstr && !mnt_optstr_get_option(optstr, "user", &mtab_user, &sz) && sz) ok = !strncmp(curr_user, mtab_user, sz); } diff --git a/libmount/src/fs.c b/libmount/src/fs.c index dc6009cf9d..86b2423ebb 100644 --- a/libmount/src/fs.c +++ b/libmount/src/fs.c @@ -486,6 +486,7 @@ int __mnt_fs_set_fstype_ptr(struct libmnt_fs *fs, char *fstype) fs->fstype = fstype; fs->flags &= ~MNT_FS_PSEUDO; fs->flags &= ~MNT_FS_NET; + fs->flags &= ~MNT_FS_SWAP; /* save info about pseudo filesystems */ if (fs->fstype) { -- 2.47.2