summaryrefslogtreecommitdiffstats
path: root/shlibs/mount/src/context_umount.c
diff options
context:
space:
mode:
authorKarel Zak2011-03-14 14:33:53 +0100
committerKarel Zak2011-03-14 14:33:53 +0100
commit5982583a4e5fdba35e496a19f94fc6400d3cfeae (patch)
treeae4a0de456db06b1b792d7a3f3ded2ed9d3a7e13 /shlibs/mount/src/context_umount.c
parentmount: rename "quiet" to "silent" (MS_SILENT) (diff)
downloadkernel-qcow2-util-linux-5982583a4e5fdba35e496a19f94fc6400d3cfeae.tar.gz
kernel-qcow2-util-linux-5982583a4e5fdba35e496a19f94fc6400d3cfeae.tar.xz
kernel-qcow2-util-linux-5982583a4e5fdba35e496a19f94fc6400d3cfeae.zip
libmount: cleanup *_do_[u]mount() return codes and docs
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.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/shlibs/mount/src/context_umount.c b/shlibs/mount/src/context_umount.c
index 3bf8fc45e..eb1a338bb 100644
--- a/shlibs/mount/src/context_umount.c
+++ b/shlibs/mount/src/context_umount.c
@@ -486,7 +486,7 @@ static int do_umount(struct libmnt_context *cxt)
DBG(CXT, mnt_debug_h(cxt, "read-only re-mount(2) failed "
"[errno=%d]",
-cxt->syscall_status));
- return cxt->syscall_status;
+ return -cxt->syscall_status;
}
cxt->syscall_status = 0;
DBG(CXT, mnt_debug_h(cxt, "read-only re-mount(2) success"));
@@ -562,7 +562,14 @@ int mnt_context_prepare_umount(struct libmnt_context *cxt)
*
* See also mnt_context_disable_helpers().
*
- * Returns: 0 on success, and negative number in case of error.
+ * WARNING: non-zero return code does not mean that umount(2) syscall or
+ * umount.type helper wasn't sucessfully called.
+ *
+ * Check mnt_context_get_status() after error!
+*
+ * Returns: 0 on success;
+ * >0 in case of umount(2) error (returns syscall errno),
+ * <0 in case of other errors.
*/
int mnt_context_do_umount(struct libmnt_context *cxt)
{
@@ -650,9 +657,14 @@ int mnt_context_finalize_umount(struct libmnt_context *cxt)
*
* See also mnt_context_disable_helpers().
*
- * Returns: 0 on success, and negative number in case of error. WARNING: error
- * does not mean that umount(2) syscall or mount.type helper wasn't
- * sucessfully called. Check mnt_context_get_status() after error!
+ * WARNING: non-zero return code does not mean that umount(2) syscall or
+ * umount.type helper wasn't sucessfully called.
+ *
+ * Check mnt_context_get_status() after error!
+ *
+ * Returns: 0 on success;
+ * >0 in case of umount(2) error (returns syscall errno),
+ * <0 in case of other errors.
*/
int mnt_context_umount(struct libmnt_context *cxt)
{