From 91a81678299730e3e44ed0ffd068c34df7ce199f Mon Sep 17 00:00:00 2001 From: Brian Feldman Date: Fri, 29 Oct 1999 09:33:50 +0000 Subject: [PATCH] Fix a logic problem that broke umount -a. Reported by: Martin Blapp --- sbin/umount/umount.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sbin/umount/umount.c b/sbin/umount/umount.c index 014509a96d1b..518351386ef1 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)