From e6aecdd3b8a00d9718fc1ef30ab6a5dbdb5a53dc Mon Sep 17 00:00:00 2001
From: Kent Overstreet <kent.overstreet@linux.dev>
Date: Wed, 19 Mar 2025 13:33:19 -0400
Subject: [PATCH] cmd_fsck: just exit if passed -a

-a is used when called from system to mean "automatic invocation, run
check only if you think you need it".

Since we have self healing and online fsck, we never need run fsck
automatically at boot time.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
 c_src/cmd_fsck.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/c_src/cmd_fsck.c b/c_src/cmd_fsck.c
index 2ea51ff2..3a33ca40 100644
--- a/c_src/cmd_fsck.c
+++ b/c_src/cmd_fsck.c
@@ -227,7 +227,10 @@ int cmd_fsck(int argc, char *argv[])
 				  "apynfo:rRkKvh",
 				  longopts, NULL)) != -1)
 		switch (opt) {
-		case 'a': /* outdated alias for -p */
+		case 'a':
+			/* "automatic" run, called by the system, for us to do checks as needed.
+			 *  we don't need checks here: */
+			exit(EXIT_SUCCESS);
 		case 'p':
 		case 'y':
 			append_opt(&opts_str, "fix_errors=yes");