pass1.c (63003) | pass1.c (69800) |
---|---|
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 --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static const char sccsid[] = "@(#)pass1.c 8.6 (Berkeley) 4/28/95"; 37#endif 38static const char rcsid[] = | 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 --- 22 unchanged lines hidden (view full) --- 31 * SUCH DAMAGE. 32 */ 33 34#ifndef lint 35#if 0 36static const char sccsid[] = "@(#)pass1.c 8.6 (Berkeley) 4/28/95"; 37#endif 38static const char rcsid[] = |
39 "$FreeBSD: head/sbin/fsck_ffs/pass1.c 63003 2000-07-12 06:19:22Z mckusick $"; | 39 "$FreeBSD: head/sbin/fsck_ffs/pass1.c 69800 2000-12-09 15:27:35Z tomsoft $"; |
40#endif /* not lint */ 41 42#include <sys/param.h> 43#include <sys/stat.h> 44 45#include <ufs/ufs/dinode.h> 46#include <ufs/ufs/dir.h> 47#include <ufs/ffs/fs.h> --- 20 unchanged lines hidden (view full) --- 68 69 /* 70 * Set file system reserved blocks in used block map. 71 */ 72 for (c = 0; c < sblock.fs_ncg; c++) { 73 cgd = cgdmin(&sblock, c); 74 if (c == 0) { 75 i = cgbase(&sblock, c); | 40#endif /* not lint */ 41 42#include <sys/param.h> 43#include <sys/stat.h> 44 45#include <ufs/ufs/dinode.h> 46#include <ufs/ufs/dir.h> 47#include <ufs/ffs/fs.h> --- 20 unchanged lines hidden (view full) --- 68 69 /* 70 * Set file system reserved blocks in used block map. 71 */ 72 for (c = 0; c < sblock.fs_ncg; c++) { 73 cgd = cgdmin(&sblock, c); 74 if (c == 0) { 75 i = cgbase(&sblock, c); |
76 cgd += howmany(sblock.fs_cssize, sblock.fs_fsize); | |
77 } else 78 i = cgsblock(&sblock, c); 79 for (; i < cgd; i++) 80 setbmap(i); 81 } | 76 } else 77 i = cgsblock(&sblock, c); 78 for (; i < cgd; i++) 79 setbmap(i); 80 } |
81 i = sblock.fs_csaddr; 82 cgd = i + howmany(sblock.fs_cssize, sblock.fs_fsize); 83 for (; i < cgd; i++) 84 setbmap(i); 85 |
|
82 /* 83 * Find all allocated blocks. 84 */ 85 memset(&idesc, 0, sizeof(struct inodesc)); 86 idesc.id_func = pass1check; 87 n_files = n_blks = 0; 88 for (c = 0; c < sblock.fs_ncg; c++) { 89 inumber = c * sblock.fs_ipg; --- 342 unchanged lines hidden --- | 86 /* 87 * Find all allocated blocks. 88 */ 89 memset(&idesc, 0, sizeof(struct inodesc)); 90 idesc.id_func = pass1check; 91 n_files = n_blks = 0; 92 for (c = 0; c < sblock.fs_ncg; c++) { 93 inumber = c * sblock.fs_ipg; --- 342 unchanged lines hidden --- |