Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mount.c3
-rw-r--r--util-linux/mount.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/mount.c b/mount.c
index 5b6ec1e71..d1568d803 100644
--- a/mount.c
+++ b/mount.c
@@ -405,6 +405,9 @@ 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");
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 5b6ec1e71..d1568d803 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -405,6 +405,9 @@ 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");