]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
umount: more robust success message for --all
authorKarel Zak <kzak@redhat.com>
Mon, 7 Apr 2014 09:59:30 +0000 (11:59 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 7 Apr 2014 10:00:51 +0000 (12:00 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/umount.c

index fe120dbaa16011783ad97bf3747054bdb283d3f9..188a53adbcedfd6f02ef88484d551a917d6a54cd 100644 (file)
@@ -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;
                }
        }