summaryrefslogtreecommitdiffstats
path: root/libmount/src/context_mount.c
diff options
context:
space:
mode:
authorKarel Zak2012-01-13 13:01:18 +0100
committerKarel Zak2012-01-13 13:01:18 +0100
commit8ab6accf014b1ba9f7437a78463dbed35f08cceb (patch)
tree61535651c2ca4d415a1e53390c50937bff27bc07 /libmount/src/context_mount.c
parenttests: fix mount/special to be compatible with libmount (diff)
downloadkernel-qcow2-util-linux-8ab6accf014b1ba9f7437a78463dbed35f08cceb.tar.gz
kernel-qcow2-util-linux-8ab6accf014b1ba9f7437a78463dbed35f08cceb.tar.xz
kernel-qcow2-util-linux-8ab6accf014b1ba9f7437a78463dbed35f08cceb.zip
libmount: add functions to export syscall/helpers status
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/context_mount.c')
-rw-r--r--libmount/src/context_mount.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
index f86b3f761..d4c20f41d 100644
--- a/libmount/src/context_mount.c
+++ b/libmount/src/context_mount.c
@@ -556,6 +556,13 @@ int mnt_context_prepare_mount(struct libmnt_context *cxt)
*
* Call mount(2) or mount.type helper. Unnecessary for mnt_context_mount().
*
+ * Note that this function could be called only once. If you want to mount
+ * another source or target than you have to call mnt_reset_context().
+ *
+ * If you want to call mount(2) for the same source and target with a diffrent
+ * mount flags or fstype then you call mnt_context_reset_state() and then try
+ * again mnt_context_do_mount().
+ *
* WARNING: non-zero return code does not mean that mount(2) syscall or
* umount.type helper wasn't sucessfully called.
*
@@ -627,6 +634,11 @@ int mnt_context_finalize_mount(struct libmnt_context *cxt)
*
* See also mnt_context_disable_helpers().
*
+ * Note that this function could be called only once. If you want to mount with
+ * different setting than you have to call mnt_reset_context(). It's NOT enough
+ * to call mnt_context_reset_state() if you want call this function more than
+ * once, whole context has to be reseted.
+ *
* WARNING: non-zero return code does not mean that mount(2) syscall or
* mount.type helper wasn't sucessfully called.
*