diff options
author | Matt Kraai <kraai@debian.org> | 2001-01-17 00:12:11 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2001-01-17 00:12:11 +0000 |
commit | fd4c58d7c5a8cd8dd72ea5fc4eb16828be998792 (patch) | |
tree | 50055e86e632aa141acd0b8cec0bc6bb5026b82f | |
parent | 9aa23ba5a81b877fbd87d481570573020c33b9c9 (diff) | |
download | busybox-w32-fd4c58d7c5a8cd8dd72ea5fc4eb16828be998792.tar.gz busybox-w32-fd4c58d7c5a8cd8dd72ea5fc4eb16828be998792.tar.bz2 busybox-w32-fd4c58d7c5a8cd8dd72ea5fc4eb16828be998792.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.
-rw-r--r-- | umount.c | 8 | ||||
-rw-r--r-- | util-linux/umount.c | 8 |
2 files changed, 8 insertions, 8 deletions
@@ -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 | } |