summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2010-01-07 00:17:36 +0000
committermckusick <mckusick@FreeBSD.org>2010-01-07 00:17:36 +0000
commit7405c67ff02ed9bb20f9a29bd633f8a989742716 (patch)
tree1504efb50e19f120ffc92046f579ee828d5e434d /sbin
parentf487d8fd6209822fde483ba4a6a69570484fd16a (diff)
downloadFreeBSD-src-7405c67ff02ed9bb20f9a29bd633f8a989742716.zip
FreeBSD-src-7405c67ff02ed9bb20f9a29bd633f8a989742716.tar.gz
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. PR: 141992 MFC after: 2 weeks Reported by: Dan Strick
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsck_ffs/fsutil.c2
1 files changed, 1 insertions, 1 deletions
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 &&
OpenPOWER on IntegriCloud