summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
authorKenneth Myhra <kennethmyhra@gmail.com>2022-02-02 17:54:59 +0100
committerAndreas Kling <kling@serenityos.org>2022-02-02 21:43:27 +0100
commit760eeb20da996156039f43aec6873c36c4d0a6c2 (patch)
treed2930806f2b72573dff6fef022e1f0baa918d30f /Userland/Utilities
parentf1c00bb439b78dd2151a14a68532ea0d11d5cfee (diff)
downloadserenity-760eeb20da996156039f43aec6873c36c4d0a6c2.zip
mount: Do not print usage if executed without any arguments
If 'mount' is executed without any arguments we should print the mount points and return early not printing the usage statement. This fixes a regression introduced in commit: 9d48406
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/mount.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Utilities/mount.cpp b/Userland/Utilities/mount.cpp
index a4021b2fdd..0425aef44f 100644
--- a/Userland/Utilities/mount.cpp
+++ b/Userland/Utilities/mount.cpp
@@ -172,8 +172,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
return 0;
}
- if (source.is_empty() && mountpoint.is_empty())
+ if (source.is_empty() && mountpoint.is_empty()) {
TRY(print_mounts());
+ return 0;
+ }
if (!source.is_empty() && !mountpoint.is_empty()) {
if (fs_type.is_empty())