From 8215b99df186cc70d86aa702d81b7d1a96dbd356 Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Tue, 1 Feb 2022 23:02:35 -0800 Subject: [PATCH] mount: Exit without error when handling mount all on system boot At the point at which `mount -a` is executed by SystemServer, the /proc fs is not yet mounted. That means that opening /proc/fd in the `print_mounts()` function will always fail with an error. 0.976 mount(8:8): Exiting with runtime error: No such file or directory (errno=2) The fix is simple, just return gracefully after we execute mount all. --- Userland/Utilities/mount.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Utilities/mount.cpp b/Userland/Utilities/mount.cpp index 5943f91eaf..a4021b2fdd 100644 --- a/Userland/Utilities/mount.cpp +++ b/Userland/Utilities/mount.cpp @@ -167,8 +167,10 @@ ErrorOr serenity_main(Main::Arguments arguments) args_parser.add_option(should_mount_all, "Mount all file systems listed in /etc/fstab", nullptr, 'a'); args_parser.parse(arguments); - if (should_mount_all) + if (should_mount_all) { TRY(mount_all()); + return 0; + } if (source.is_empty() && mountpoint.is_empty()) TRY(print_mounts());