pass1b.c (70050) | pass1b.c (92806) |
---|---|
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[] = "@(#)pass1b.c 8.4 (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[] = "@(#)pass1b.c 8.4 (Berkeley) 4/28/95"; 37#endif 38static const char rcsid[] = |
39 "$FreeBSD: head/sbin/fsck_ffs/pass1b.c 70050 2000-12-15 14:23:55Z iedowse $"; | 39 "$FreeBSD: head/sbin/fsck_ffs/pass1b.c 92806 2002-03-20 17:55:10Z obrien $"; |
40#endif /* not lint */ 41 42#include <sys/param.h> 43 44#include <ufs/ufs/dinode.h> 45#include <ufs/ffs/fs.h> 46 47#include <string.h> 48 49#include "fsck.h" 50 51static struct dups *duphead; 52static int pass1bcheck __P((struct inodesc *)); 53 54void 55pass1b() 56{ | 40#endif /* not lint */ 41 42#include <sys/param.h> 43 44#include <ufs/ufs/dinode.h> 45#include <ufs/ffs/fs.h> 46 47#include <string.h> 48 49#include "fsck.h" 50 51static struct dups *duphead; 52static int pass1bcheck __P((struct inodesc *)); 53 54void 55pass1b() 56{ |
57 register int c, i; 58 register struct dinode *dp; | 57 int c, i; 58 struct dinode *dp; |
59 struct inodesc idesc; 60 ino_t inumber; 61 62 memset(&idesc, 0, sizeof(struct inodesc)); 63 idesc.id_type = ADDR; 64 idesc.id_func = pass1bcheck; 65 duphead = duplist; 66 inumber = 0; --- 15 unchanged lines hidden (view full) --- 82 (ckinode(dp, &idesc) & STOP)) 83 return; 84 } 85 } 86} 87 88static int 89pass1bcheck(idesc) | 59 struct inodesc idesc; 60 ino_t inumber; 61 62 memset(&idesc, 0, sizeof(struct inodesc)); 63 idesc.id_type = ADDR; 64 idesc.id_func = pass1bcheck; 65 duphead = duplist; 66 inumber = 0; --- 15 unchanged lines hidden (view full) --- 82 (ckinode(dp, &idesc) & STOP)) 83 return; 84 } 85 } 86} 87 88static int 89pass1bcheck(idesc) |
90 register struct inodesc *idesc; | 90 struct inodesc *idesc; |
91{ | 91{ |
92 register struct dups *dlp; | 92 struct dups *dlp; |
93 int nfrags, res = KEEPON; 94 ufs_daddr_t blkno = idesc->id_blkno; 95 96 for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) { 97 if (chkrange(blkno, 1)) 98 res = SKIP; 99 for (dlp = duphead; dlp; dlp = dlp->next) { 100 if (dlp->dup == blkno) { --- 13 unchanged lines hidden --- | 93 int nfrags, res = KEEPON; 94 ufs_daddr_t blkno = idesc->id_blkno; 95 96 for (nfrags = idesc->id_numfrags; nfrags > 0; blkno++, nfrags--) { 97 if (chkrange(blkno, 1)) 98 res = SKIP; 99 for (dlp = duphead; dlp; dlp = dlp->next) { 100 if (dlp->dup == blkno) { --- 13 unchanged lines hidden --- |