From 67381ac879e09443413d6c8099abfe4a91ec50a5 Mon Sep 17 00:00:00 2001 From: mckusick Date: Wed, 10 Feb 2010 20:35:20 +0000 Subject: MFC of r201700 | mckusick | 2010-01-06 This corrects a bug that manifested itself as identifying the last cylinder group of a UFS1 filesystem as bad. The error was in the check and not in the cylinder group itself. So even though fsck fixed the cylinder group correctly, it was still endlessly reported as bad. This bug first appeared in 8.0 so does not apply to earlier releases. PR: 141992 Reported by: Dan Strick --- sbin/fsck_ffs/fsutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sbin') diff --git a/sbin/fsck_ffs/fsutil.c b/sbin/fsck_ffs/fsutil.c index 4ce2ef2..68d113a 100644 --- a/sbin/fsck_ffs/fsutil.c +++ b/sbin/fsck_ffs/fsutil.c @@ -436,7 +436,7 @@ check_cgmagic(int cg, struct cg *cgp) ((sblock.fs_magic == FS_UFS1_MAGIC && cgp->cg_old_niblk == sblock.fs_ipg && cgp->cg_ndblk <= sblock.fs_fpg && - cgp->cg_old_ncyl == sblock.fs_old_cpg) || + cgp->cg_old_ncyl <= sblock.fs_old_cpg) || (sblock.fs_magic == FS_UFS2_MAGIC && cgp->cg_niblk == sblock.fs_ipg && cgp->cg_ndblk <= sblock.fs_fpg && -- cgit v1.1