aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2021-04-27 01:42:48 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2021-05-17 00:41:11 +0000
commit2e762b02521c8d189f568ddf14cda025e40bb1ef (patch)
tree22b6ccfb85f427f4e562f4fe7ed20ba7e60f48ce
parent501b4fb50e80d9f34ec85f79a4e438d66f9a00e4 (diff)
downloadsrc-2e762b02521c8d189f568ddf14cda025e40bb1ef.tar.gz
src-2e762b02521c8d189f568ddf14cda025e40bb1ef.zip
Clean up fsck_ffs error message output.
(cherry picked from commit 689724cb23c2acf58091c80f27de4823d7cd87ca) Sponsored by: Netflix
-rw-r--r--sbin/fsck_ffs/fsutil.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c
index 276d543dedc6..b13ba4c54bde 100644
--- a/sbin/fsck_ffs/fsutil.c
+++ b/sbin/fsck_ffs/fsutil.c
@@ -948,6 +948,7 @@ check_cgmagic(int cg, struct bufarea *cgbp, int request_rebuild)
{
struct cg *cgp = cgbp->b_un.b_cg;
uint32_t cghash, calchash;
+ static int prevfailcg = -1;
/*
* Extended cylinder group checks.
@@ -973,9 +974,14 @@ check_cgmagic(int cg, struct bufarea *cgbp, int request_rebuild)
cgp->cg_initediblk <= sblock.fs_ipg))) {
return (1);
}
+ if (prevfailcg == cg)
+ return (0);
+ prevfailcg = cg;
pfatal("CYLINDER GROUP %d: INTEGRITY CHECK FAILED", cg);
- if (!request_rebuild)
+ if (!request_rebuild) {
+ printf("\n");
return (0);
+ }
if (!reply("REBUILD CYLINDER GROUP")) {
printf("YOU WILL NEED TO RERUN FSCK.\n");
rerun = 1;