-
- ndp->ni_dent.d_ino = ip->i_number;
- ndp->ni_count = ndp->ni_resid = DIRSIZ(&ndp->ni_dent);
- ndp->ni_base = (caddr_t)&ndp->ni_dent;
- return (writeip(dp, &ndp->ni_uio, ndp->ni_cred));
-}
-
-/*
- * Return buffer with 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.
- */
-blkatoff(ip, offset, res, bpp)
- struct inode *ip;
- off_t offset;
- char **res;
- struct buf **bpp;
-{
- register struct fs *fs = ip->i_fs;
- daddr_t lbn = lblkno(fs, offset);
- int bsize = blksize(fs, ip, lbn);