From: Matt Kraai Date: Wed, 17 Jan 2001 00:12:11 +0000 (-0000) Subject: Fix the exit status of umount -a, a casualty of the TRUE/FALSE normalization. X-Git-Tag: 0_49~65 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fd4c58d7c5a8cd8dd72ea5fc4eb16828be998792;p=oweals%2Fbusybox.git Fix the exit status of umount -a, a casualty of the TRUE/FALSE normalization. Thanks to Francois-R Boyer for the report. --- diff --git a/umount.c b/umount.c index 0867118c0..40d25f90a 100644 --- a/umount.c +++ b/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; } } } diff --git a/util-linux/umount.c b/util-linux/umount.c index 0867118c0..40d25f90a 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; } } }