diff options
-rw-r--r-- | mount.c | 3 | ||||
-rw-r--r-- | util-linux/mount.c | 3 |
2 files changed, 6 insertions, 0 deletions
@@ -405,6 +405,9 @@ extern int mount_main(int argc, char **argv) | |||
405 | argv++; | 405 | argv++; |
406 | } | 406 | } |
407 | 407 | ||
408 | if (device == NULL && directory == NULL) | ||
409 | goto goodbye; | ||
410 | |||
408 | if (all == TRUE || directory == NULL) { | 411 | if (all == TRUE || directory == NULL) { |
409 | struct mntent *m; | 412 | struct mntent *m; |
410 | FILE *f = setmntent("/etc/fstab", "r"); | 413 | 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) | |||
405 | argv++; | 405 | argv++; |
406 | } | 406 | } |
407 | 407 | ||
408 | if (device == NULL && directory == NULL) | ||
409 | goto goodbye; | ||
410 | |||
408 | if (all == TRUE || directory == NULL) { | 411 | if (all == TRUE || directory == NULL) { |
409 | struct mntent *m; | 412 | struct mntent *m; |
410 | FILE *f = setmntent("/etc/fstab", "r"); | 413 | FILE *f = setmntent("/etc/fstab", "r"); |