1/* 2 * Copyright (c) 1980, 1986, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 19 unchanged lines hidden (view full) --- 28 */ 29 30#if 0 31#ifndef lint 32static const char sccsid[] = "@(#)pass5.c 8.9 (Berkeley) 4/28/95"; 33#endif /* not lint */ 34#endif 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sbin/fsck_ffs/pass5.c 163845 2006-10-31 22:06:56Z pjd $"); |
37 38#include <sys/param.h> 39#include <sys/sysctl.h> 40 41#include <ufs/ufs/dinode.h> 42#include <ufs/ffs/fs.h> 43 44#include <err.h> --- 114 unchanged lines hidden (view full) --- 159 c * 100 / sblock.fs_ncg); 160 got_sigalarm = 0; 161 } 162 getblk(&cgblk, cgtod(fs, c), fs->fs_cgsize); 163 if (!cg_chkmagic(cg)) 164 pfatal("CG %d: BAD MAGIC NUMBER\n", c); 165 newcg->cg_time = cg->cg_time; 166 newcg->cg_old_time = cg->cg_old_time; |
167 newcg->cg_unrefs = cg->cg_unrefs; |
168 newcg->cg_cgx = c; 169 dbase = cgbase(fs, c); 170 dmax = dbase + fs->fs_fpg; 171 if (dmax > fs->fs_size) 172 dmax = fs->fs_size; 173 newcg->cg_ndblk = dmax - dbase; 174 if (fs->fs_magic == FS_UFS1_MAGIC) { 175 if (c == fs->fs_ncg - 1) --- 358 unchanged lines hidden --- |