* Copyright (c) 1991 Regents of the University of California.
* %sccs.include.redist.c%
* @(#)lfs_subr.c 7.8 (Berkeley) %G%
#include <ufs/ufs/quota.h>
#include <ufs/ufs/inode.h>
#include <ufs/lfs/lfs_extern.h>
* Return buffer with the contents of block "offset" from the beginning of
* directory "ip". If "res" is non-zero, fill it in with a pointer to the
* remaining space in the directory.
lfs_blkatoff(vp
, offset
, res
, bpp
)
lbn
= lblkno(fs
, offset
);
if (error
= bread(vp
, lbn
, bsize
, NOCRED
, &bp
)) {
*res
= bp
->b_un
.b_addr
+ blkoff(fs
, offset
);
/* Search a block for a specific dinode. */
printf("lfs_ifind: inode %d\n", ino
);
for (cnt
= INOPB(fs
); cnt
--; ++dip
)
panic("lfs_ifind: dinode %u not found", ino
);