diff options
author | Karel Zak | 2014-04-07 11:59:30 +0200 |
---|---|---|
committer | Karel Zak | 2014-04-07 12:00:51 +0200 |
commit | 0ce2fe873817a75494afe1d78bf85e74ca4cd8ab (patch) | |
tree | 724a02c636eabf4bec85dc37dbd5874afdbfd9ed | |
parent | mount: fix --all and nofail return code (diff) | |
download | kernel-qcow2-util-linux-0ce2fe873817a75494afe1d78bf85e74ca4cd8ab.tar.gz kernel-qcow2-util-linux-0ce2fe873817a75494afe1d78bf85e74ca4cd8ab.tar.xz kernel-qcow2-util-linux-0ce2fe873817a75494afe1d78bf85e74ca4cd8ab.zip |
umount: more robust success message for --all
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | sys-utils/umount.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys-utils/umount.c b/sys-utils/umount.c index fe120dbaa..188a53adb 100644 --- a/sys-utils/umount.c +++ b/sys-utils/umount.c @@ -281,10 +281,12 @@ static int umount_all(struct libmnt_context *cxt) if (mnt_context_is_verbose(cxt)) printf(_("%-25s: ignored\n"), tgt); } else { - rc |= mk_exit_code(cxt, mntrc); + int xrc = mk_exit_code(cxt, mntrc); - if (mnt_context_is_verbose(cxt)) + if (xrc == MOUNT_EX_SUCCESS + && mnt_context_is_verbose(cxt)) printf("%-25s: successfully unmounted\n", tgt); + rc |= xrc; } } |