git: cad6b1e358b4 - stable/12 - Clean up fsck_ffs error message output.
Kirk McKusick
mckusick at FreeBSD.org
Mon May 17 05:00:21 UTC 2021
The branch stable/12 has been updated by mckusick:
URL: https://cgit.FreeBSD.org/src/commit/?id=cad6b1e358b448e114d87607278cb7860ef661d1
commit cad6b1e358b448e114d87607278cb7860ef661d1
Author: Kirk McKusick <mckusick at FreeBSD.org>
AuthorDate: 2021-04-27 01:42:48 +0000
Commit: Kirk McKusick <mckusick at FreeBSD.org>
CommitDate: 2021-05-17 05:03:32 +0000
Clean up fsck_ffs error message output.
(cherry picked from commit 689724cb23c2acf58091c80f27de4823d7cd87ca)
Sponsored by: Netflix
---
sbin/fsck_ffs/fsutil.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c
index 84c4437d3312..df2e62d583c2 100644
--- a/sbin/fsck_ffs/fsutil.c
+++ b/sbin/fsck_ffs/fsutil.c
@@ -682,6 +682,7 @@ int
check_cgmagic(int cg, struct bufarea *cgbp)
{
struct cg *cgp = cgbp->b_un.b_cg;
+ static int prevfailcg = -1;
/*
* Extended cylinder group checks.
@@ -697,6 +698,9 @@ check_cgmagic(int cg, struct bufarea *cgbp)
cgp->cg_initediblk <= sblock.fs_ipg))) {
return (1);
}
+ if (prevfailcg == cg)
+ return (0);
+ prevfailcg = cg;
pfatal("CYLINDER GROUP %d: BAD MAGIC NUMBER", cg);
if (!reply("REBUILD CYLINDER GROUP")) {
printf("YOU WILL NEED TO RERUN FSCK.\n");
More information about the dev-commits-src-all
mailing list