From 24ed3bee0c4ca631855a0f43f75e30ba0c134b9f Mon Sep 17 00:00:00 2001
From: Matt Kraai <kraai@debian.org>
Date: Tue, 17 Apr 2001 04:26:05 +0000
Subject: Fix -a support (broken by previous patch).

---
 mount.c            | 6 +++---
 util-linux/mount.c | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/mount.c b/mount.c
index d1568d803..311d518aa 100644
--- a/mount.c
+++ b/mount.c
@@ -405,14 +405,14 @@ extern int mount_main(int argc, char **argv)
 		argv++;
 	}
 
-	if (device == NULL && directory == NULL)
-		goto goodbye;
-
 	if (all == TRUE || directory == NULL) {
 		struct mntent *m;
 		FILE *f = setmntent("/etc/fstab", "r");
 		fstabmount = TRUE;
 
+		if (all == FALSE && device == NULL)
+			goto goodbye;
+
 		if (f == NULL)
 			perror_msg_and_die( "\nCannot read /etc/fstab");
 
diff --git a/util-linux/mount.c b/util-linux/mount.c
index d1568d803..311d518aa 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -405,14 +405,14 @@ extern int mount_main(int argc, char **argv)
 		argv++;
 	}
 
-	if (device == NULL && directory == NULL)
-		goto goodbye;
-
 	if (all == TRUE || directory == NULL) {
 		struct mntent *m;
 		FILE *f = setmntent("/etc/fstab", "r");
 		fstabmount = TRUE;
 
+		if (all == FALSE && device == NULL)
+			goto goodbye;
+
 		if (f == NULL)
 			perror_msg_and_die( "\nCannot read /etc/fstab");
 
-- 
cgit v1.2.3-55-g6feb