diff options
author | green <green@FreeBSD.org> | 1999-10-29 09:33:50 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 1999-10-29 09:33:50 +0000 |
commit | 40c138736e018245f8cd75041abb0745032a86f5 (patch) | |
tree | 8814325bb733eab1c8c99a6faabcb6f4761b6b5a /sbin | |
parent | 874dac187b642784aa6f34c4d6d9cf7d089f78f1 (diff) | |
download | FreeBSD-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.c | 9 |
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) |