From: Karel Zak Date: Mon, 27 Jun 2011 11:31:48 +0000 (+0200) Subject: libmount: minor fixes X-Git-Tag: v2.20-rc1~144 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dfc98439280aedd3df095276df5e20f1bf7a2d2;p=thirdparty%2Futil-linux.git libmount: minor fixes Signed-off-by: Karel Zak --- 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) {