summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorMatt Kraai2001-01-17 00:12:11 +0000
committerMatt Kraai2001-01-17 00:12:11 +0000
commitfd4c58d7c5a8cd8dd72ea5fc4eb16828be998792 (patch)
tree50055e86e632aa141acd0b8cec0bc6bb5026b82f /util-linux
parent9aa23ba5a81b877fbd87d481570573020c33b9c9 (diff)
downloadbusybox-fd4c58d7c5a8cd8dd72ea5fc4eb16828be998792.zip
busybox-fd4c58d7c5a8cd8dd72ea5fc4eb16828be998792.tar.gz
Fix the exit status of umount -a, a casualty of the TRUE/FALSE normalization.
Thanks to Francois-R Boyer <boyerf@IRO.UMontreal.CA> for the report.
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/umount.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 0867118..40d25f9 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -212,18 +212,18 @@ static int umount_all(int useMtab)
/* Never umount /proc on a umount -a */
if (strstr(mountpt, "proc")!= NULL)
continue;
- status = do_umount(mountpt, useMtab);
- if (status != 0) {
+ if (!do_umount(mountpt, useMtab)) {
/* Don't bother retrying the umount on busy devices */
if (errno == EBUSY) {
perror_msg("%s", mountpt);
+ status = FALSE;
continue;
}
- status = do_umount(mountpt, useMtab);
- if (status != 0) {
+ if (!do_umount(mountpt, useMtab)) {
printf("Couldn't umount %s on %s: %s\n",
mountpt, mtab_getinfo(mountpt, MTAB_GETDEVICE),
strerror(errno));
+ status = FALSE;
}
}
}