summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>1999-10-29 09:33:50 +0000
committergreen <green@FreeBSD.org>1999-10-29 09:33:50 +0000
commit40c138736e018245f8cd75041abb0745032a86f5 (patch)
tree8814325bb733eab1c8c99a6faabcb6f4761b6b5a /sbin
parent874dac187b642784aa6f34c4d6d9cf7d089f78f1 (diff)
downloadFreeBSD-src-40c138736e018245f8cd75041abb0745032a86f5.zip
FreeBSD-src-40c138736e018245f8cd75041abb0745032a86f5.tar.gz
Fix a logic problem that broke umount -a.
Reported by: Martin Blapp <mb@imp.ch>
Diffstat (limited to 'sbin')
-rw-r--r--sbin/umount/umount.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c
index 014509a..5183513 100644
--- a/sbin/umount/umount.c
+++ b/sbin/umount/umount.c
@@ -193,11 +193,12 @@ umountall(char **typelist)
char *cp;
static int firstcall = 1;
- if ((fs = getfsent()) != NULL) {
- if (firstcall)
- errx(1, "fstab reading failure");
+ if ((fs = getfsent()) != NULL)
firstcall = 0;
- }
+ else if (firstcall)
+ errx(1, "fstab reading failure");
+ else
+ return (0);
do {
/* Ignore the root. */
if (strcmp(fs->fs_file, "/") == 0)
OpenPOWER on IntegriCloud