]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: minor fixes
authorKarel Zak <kzak@redhat.com>
Mon, 27 Jun 2011 11:31:48 +0000 (13:31 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 27 Jun 2011 11:31:48 +0000 (13:31 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context_umount.c
libmount/src/fs.c

index e10af52f2cf9d26c0265a639c1b6007a0617f49e..184a51efe0c36fb39b8daddb1b3cf00cddde85e2 100644 (file)
@@ -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);
        }
index dc6009cf9df27ae329c46383df47f3fb156be3cc..86b2423ebb5723d2d7f2ef5a348402b604e81922 100644 (file)
@@ -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) {