From 40c138736e018245f8cd75041abb0745032a86f5 Mon Sep 17 00:00:00 2001 From: green Date: Fri, 29 Oct 1999 09:33:50 +0000 Subject: Fix a logic problem that broke umount -a. Reported by: Martin Blapp --- sbin/umount/umount.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sbin/umount/umount.c') 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) -- cgit v1.1