diff options
author | Karel Zak | 2012-01-13 16:27:50 +0100 |
---|---|---|
committer | Karel Zak | 2012-01-13 16:27:50 +0100 |
commit | dc4dbbf188be91da4b13b29e04ae94f2f831e4ab (patch) | |
tree | 91713f0d0fc33f5b9ab330b3b77c92996915f01c /libmount/src/context_mount.c | |
parent | libmount: allow to use UUID and LABEL for owner/group mount options in fstab (diff) | |
download | kernel-qcow2-util-linux-dc4dbbf188be91da4b13b29e04ae94f2f831e4ab.tar.gz kernel-qcow2-util-linux-dc4dbbf188be91da4b13b29e04ae94f2f831e4ab.tar.xz kernel-qcow2-util-linux-dc4dbbf188be91da4b13b29e04ae94f2f831e4ab.zip |
libmount: allow to toggle ro/rw and mount again
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_mount.c')
-rw-r--r-- | libmount/src/context_mount.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index bb895425f..6f2a3dc11 100644 --- a/libmount/src/context_mount.c +++ b/libmount/src/context_mount.c @@ -39,7 +39,7 @@ static int fix_optstr(struct libmnt_context *cxt) if (!cxt) return -EINVAL; - if (!cxt->fs) + if (!cxt->fs || (cxt->flags & MNT_FL_MOUNTOPTS_FIXED)) return 0; DBG(CXT, mnt_debug_h(cxt, "mount: fixing optstr")); @@ -133,6 +133,8 @@ static int fix_optstr(struct libmnt_context *cxt) fs->optstr = NULL; fs->optstr = mnt_fs_strdup_options(fs); done: + cxt->flags |= MNT_FL_MOUNTOPTS_FIXED; + DBG(CXT, mnt_debug_h(cxt, "fixed options [rc=%d]: " "vfs: '%s' fs: '%s' user: '%s', optstr: '%s'", rc, fs->vfs_optstr, fs->fs_optstr, fs->user_optstr, fs->optstr)); |