summaryrefslogtreecommitdiffstats
path: root/shlibs/mount/src/context_umount.c
diff options
context:
space:
mode:
authorKarel Zak2011-02-02 14:10:42 +0100
committerKarel Zak2011-02-02 14:10:42 +0100
commit8fb81f73cfc60af4a5535067c5ca0397c10fe640 (patch)
treedd3436568162352f78d2eafc86ec8ea4095448f6 /shlibs/mount/src/context_umount.c
parentlibblkid: check for swap or DM cow on small devices (diff)
downloadkernel-qcow2-util-linux-8fb81f73cfc60af4a5535067c5ca0397c10fe640.tar.gz
kernel-qcow2-util-linux-8fb81f73cfc60af4a5535067c5ca0397c10fe640.tar.xz
kernel-qcow2-util-linux-8fb81f73cfc60af4a5535067c5ca0397c10fe640.zip
libmount: copy mount attrs from utab to context
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/mount/src/context_umount.c')
-rw-r--r--shlibs/mount/src/context_umount.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/shlibs/mount/src/context_umount.c b/shlibs/mount/src/context_umount.c
index 4106b214d..7f71ef2be 100644
--- a/shlibs/mount/src/context_umount.c
+++ b/shlibs/mount/src/context_umount.c
@@ -73,7 +73,7 @@ static int lookup_umount_fs(struct libmnt_context *cxt)
return 0;
}
- /* copy from mtab/fstab to our FS description
+ /* copy from mtab to our FS description
*/
rc = mnt_fs_set_source(cxt->fs, mnt_fs_get_source(fs));
if (!rc)
@@ -88,6 +88,8 @@ static int lookup_umount_fs(struct libmnt_context *cxt)
rc = mnt_fs_set_fs_options(cxt->fs, mnt_fs_get_fs_options(fs));
if (!rc)
rc = mnt_fs_set_user_options(cxt->fs, mnt_fs_get_user_options(fs));
+ if (!rc)
+ rc = mnt_fs_set_attributes(cxt->fs, mnt_fs_get_attributes(fs));
if (!rc && mnt_fs_get_bindsrc(fs))
rc = mnt_fs_set_bindsrc(cxt->fs, mnt_fs_get_bindsrc(fs));
@@ -473,6 +475,9 @@ int mnt_context_do_umount(struct libmnt_context *cxt)
rc = mnt_context_prepare_target(cxt);
if (!rc && !cxt->helper)
rc = mnt_context_prepare_helper(cxt, "umount", NULL);
+
+ /* TODO : evaluate fstype pattern */
+
/* TODO
if ((cxt->flags & MNT_FL_LOOPDEL) &&
(!mnt_is_loopdev(src) || mnt_loopdev_is_autoclear(src)))