aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-01-17 00:12:11 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-01-17 00:12:11 +0000
commit6f6da437edba536043fefc8045c19a33e94e3f88 (patch)
tree50055e86e632aa141acd0b8cec0bc6bb5026b82f
parent3264b775fd3fdb090094753bc495b87273242dbb (diff)
downloadbusybox-w32-6f6da437edba536043fefc8045c19a33e94e3f88.tar.gz
busybox-w32-6f6da437edba536043fefc8045c19a33e94e3f88.tar.bz2
busybox-w32-6f6da437edba536043fefc8045c19a33e94e3f88.zip
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. git-svn-id: svn://busybox.net/trunk/busybox@1599 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--umount.c8
-rw-r--r--util-linux/umount.c8
2 files changed, 8 insertions, 8 deletions
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)
212 /* Never umount /proc on a umount -a */ 212 /* Never umount /proc on a umount -a */
213 if (strstr(mountpt, "proc")!= NULL) 213 if (strstr(mountpt, "proc")!= NULL)
214 continue; 214 continue;
215 status = do_umount(mountpt, useMtab); 215 if (!do_umount(mountpt, useMtab)) {
216 if (status != 0) {
217 /* Don't bother retrying the umount on busy devices */ 216 /* Don't bother retrying the umount on busy devices */
218 if (errno == EBUSY) { 217 if (errno == EBUSY) {
219 perror_msg("%s", mountpt); 218 perror_msg("%s", mountpt);
219 status = FALSE;
220 continue; 220 continue;
221 } 221 }
222 status = do_umount(mountpt, useMtab); 222 if (!do_umount(mountpt, useMtab)) {
223 if (status != 0) {
224 printf("Couldn't umount %s on %s: %s\n", 223 printf("Couldn't umount %s on %s: %s\n",
225 mountpt, mtab_getinfo(mountpt, MTAB_GETDEVICE), 224 mountpt, mtab_getinfo(mountpt, MTAB_GETDEVICE),
226 strerror(errno)); 225 strerror(errno));
226 status = FALSE;
227 } 227 }
228 } 228 }
229 } 229 }
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)
212 /* Never umount /proc on a umount -a */ 212 /* Never umount /proc on a umount -a */
213 if (strstr(mountpt, "proc")!= NULL) 213 if (strstr(mountpt, "proc")!= NULL)
214 continue; 214 continue;
215 status = do_umount(mountpt, useMtab); 215 if (!do_umount(mountpt, useMtab)) {
216 if (status != 0) {
217 /* Don't bother retrying the umount on busy devices */ 216 /* Don't bother retrying the umount on busy devices */
218 if (errno == EBUSY) { 217 if (errno == EBUSY) {
219 perror_msg("%s", mountpt); 218 perror_msg("%s", mountpt);
219 status = FALSE;
220 continue; 220 continue;
221 } 221 }
222 status = do_umount(mountpt, useMtab); 222 if (!do_umount(mountpt, useMtab)) {
223 if (status != 0) {
224 printf("Couldn't umount %s on %s: %s\n", 223 printf("Couldn't umount %s on %s: %s\n",
225 mountpt, mtab_getinfo(mountpt, MTAB_GETDEVICE), 224 mountpt, mtab_getinfo(mountpt, MTAB_GETDEVICE),
226 strerror(errno)); 225 strerror(errno));
226 status = FALSE;
227 } 227 }
228 } 228 }
229 } 229 }