From 760eeb20da996156039f43aec6873c36c4d0a6c2 Mon Sep 17 00:00:00 2001 From: Kenneth Myhra Date: Wed, 2 Feb 2022 17:54:59 +0100 Subject: 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 --- Userland/Utilities/mount.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Userland') 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 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()) -- cgit v1.2.3