tytso/e2fsprogs

fsck should be less verbose unless requested

Closed this issue · 1 comments

I would like to propose a simple change to make fsck less noisy and only show the version when "verbose" flag is set:

Index: b/e2fsck/unix.c
===================================================================
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1448,7 +1448,7 @@ int main (int argc, char *argv[])
 	}
 
 	init_resource_track(&ctx->global_rtrack, NULL);
-	if (!(ctx->options & E2F_OPT_PREEN) || show_version_only)
+  if (verbose || show_version_only)
 		log_err(ctx, "e2fsck %s (%s)\n", my_ver_string,
 			 my_ver_date);

Displaying the version number unconditionally was an explicit decision, because users are terrible at sending bug reports, and having the e2fsck version when they report problems is very helpful, and if we didn't report it in the e2fsck output, it's much less likely that they we will need to get back to them and ask "what version of e2fsck were you using" when you sent a bug report of the form "something broke".