diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-10-18 00:33:00 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-10-18 00:33:00 +0000 |
commit | a7779d7530edf79610c1fd4de905a277cbd3a720 (patch) | |
tree | b80e08f1b4ed04f2e34549e2795c06a863c219b7 /ufs-fsck | |
parent | 563e3b7581bf9fe857c88dc0a51f3b454a4ecb57 (diff) |
Formerly pass2.c.~9~
Diffstat (limited to 'ufs-fsck')
-rw-r--r-- | ufs-fsck/pass2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ufs-fsck/pass2.c b/ufs-fsck/pass2.c index a261ff1d..a04b475e 100644 --- a/ufs-fsck/pass2.c +++ b/ufs-fsck/pass2.c @@ -177,9 +177,10 @@ pass2 () /* Called for each filesystem block of the directory. Load BNO into core and then call CHECK1BLOCK for each DIRBLKSIZ chunk. + OFFSET is the offset this block occupies ithe file. Always return 1. */ int - checkdirblock (daddr_t bno, int nfrags) + checkdirblock (daddr_t bno, int nfrags, off_t offset) { void *buf = alloca (nfrags * sblock->fs_fsize); void *bufp; @@ -188,7 +189,8 @@ pass2 () readblock (fsbtodb (sblock, bno), buf, nfrags * sblock->fs_fsize); rewrite = 0; for (bufp = buf; - bufp - buf < nfrags * sblock->fs_fsize; + bufp - buf < nfrags * sblock->fs_fsize + && offset + (bufp - buf) + DIRBLKSIZ <= dnp->i_isize; bufp += DIRBLKSIZ) { if (check1block (bufp)) |