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.
This commit is contained in:
parent
9aa23ba5a8
commit
fd4c58d7c5
8
umount.c
8
umount.c
@ -212,18 +212,18 @@ static int umount_all(int useMtab)
|
|||||||
/* Never umount /proc on a umount -a */
|
/* Never umount /proc on a umount -a */
|
||||||
if (strstr(mountpt, "proc")!= NULL)
|
if (strstr(mountpt, "proc")!= NULL)
|
||||||
continue;
|
continue;
|
||||||
status = do_umount(mountpt, useMtab);
|
if (!do_umount(mountpt, useMtab)) {
|
||||||
if (status != 0) {
|
|
||||||
/* Don't bother retrying the umount on busy devices */
|
/* Don't bother retrying the umount on busy devices */
|
||||||
if (errno == EBUSY) {
|
if (errno == EBUSY) {
|
||||||
perror_msg("%s", mountpt);
|
perror_msg("%s", mountpt);
|
||||||
|
status = FALSE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
status = do_umount(mountpt, useMtab);
|
if (!do_umount(mountpt, useMtab)) {
|
||||||
if (status != 0) {
|
|
||||||
printf("Couldn't umount %s on %s: %s\n",
|
printf("Couldn't umount %s on %s: %s\n",
|
||||||
mountpt, mtab_getinfo(mountpt, MTAB_GETDEVICE),
|
mountpt, mtab_getinfo(mountpt, MTAB_GETDEVICE),
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
status = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -212,18 +212,18 @@ static int umount_all(int useMtab)
|
|||||||
/* Never umount /proc on a umount -a */
|
/* Never umount /proc on a umount -a */
|
||||||
if (strstr(mountpt, "proc")!= NULL)
|
if (strstr(mountpt, "proc")!= NULL)
|
||||||
continue;
|
continue;
|
||||||
status = do_umount(mountpt, useMtab);
|
if (!do_umount(mountpt, useMtab)) {
|
||||||
if (status != 0) {
|
|
||||||
/* Don't bother retrying the umount on busy devices */
|
/* Don't bother retrying the umount on busy devices */
|
||||||
if (errno == EBUSY) {
|
if (errno == EBUSY) {
|
||||||
perror_msg("%s", mountpt);
|
perror_msg("%s", mountpt);
|
||||||
|
status = FALSE;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
status = do_umount(mountpt, useMtab);
|
if (!do_umount(mountpt, useMtab)) {
|
||||||
if (status != 0) {
|
|
||||||
printf("Couldn't umount %s on %s: %s\n",
|
printf("Couldn't umount %s on %s: %s\n",
|
||||||
mountpt, mtab_getinfo(mountpt, MTAB_GETDEVICE),
|
mountpt, mtab_getinfo(mountpt, MTAB_GETDEVICE),
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
status = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user