diff options
author | Karel Zak | 2010-11-23 12:21:12 +0100 |
---|---|---|
committer | Karel Zak | 2011-01-03 12:28:46 +0100 |
commit | 21193a4890f29fb8e7b6361aa1e5288f874396b9 (patch) | |
tree | ed152b42c84a00bfb4f6d7880a02e851b5afda18 /shlibs/mount/src/context_umount.c | |
parent | findmnt: fix exit code (diff) | |
download | kernel-qcow2-util-linux-21193a4890f29fb8e7b6361aa1e5288f874396b9.tar.gz kernel-qcow2-util-linux-21193a4890f29fb8e7b6361aa1e5288f874396b9.tar.xz kernel-qcow2-util-linux-21193a4890f29fb8e7b6361aa1e5288f874396b9.zip |
libmount: add new debug messages, fix umount return code
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/shlibs/mount/src/context_umount.c b/shlibs/mount/src/context_umount.c index 87a0bc8ef..00bad1091 100644 --- a/shlibs/mount/src/context_umount.c +++ b/shlibs/mount/src/context_umount.c @@ -31,6 +31,8 @@ static int lookup_umount_fs(mnt_context *cxt) assert(cxt); assert(cxt->fs); + DBG(CXT, mnt_debug_h(cxt, "umount: lookup FS")); + tgt = mnt_fs_get_target(cxt->fs); if (!tgt) { DBG(CXT, mnt_debug_h(cxt, "umount: undefined target")); @@ -409,6 +411,7 @@ static int do_umount(mnt_context *cxt) -cxt->syscall_status)); return -cxt->syscall_status; } + cxt->syscall_status = 0; DBG(CXT, mnt_debug_h(cxt, "umount(2) success")); return 0; } @@ -474,6 +477,8 @@ int mnt_context_do_umount(mnt_context *cxt) const char *o = mnt_fs_get_optstr(cxt->fs); char *n = o ? strdup(o) : NULL; + DBG(CXT, mnt_debug_h(cxt, "fix remount-on-umount update")); + if (n) mnt_optstr_remove_option(&n, "rw"); rc = mnt_optstr_prepend_option(&n, "ro", NULL); |