dirtemplate
static struct dirtemplate emptydir = {
static struct dirtemplate dirhead = {
struct dirtemplate *dirp;
memmove(bp->b_un.b_buf, dirp, sizeof(struct dirtemplate));
#define MINDIRSIZE (sizeof (struct dirtemplate))
struct dirtemplate dbuf;
#define MINDIRSIZ (sizeof(struct dirtemplate) / 2)
struct dirtemplate dirbuf;
sizeof(struct dirtemplate), (off_t)0, UIO_SYSSPACE,
struct dirtemplate dirtemplate, *dtp;
dirtemplate = *dtp;
dirtemplate.dot_ino = htole32(ip->i_number);
dirtemplate.dotdot_ino = htole32(dp->i_number);
dirtemplate.dotdot_reclen = htole16(DIRBLKSIZ - 12);
dirtemplate.dotdot_reclen =
htole16(le16toh(dirtemplate.dotdot_reclen) -
memcpy(buf, &dirtemplate, sizeof(dirtemplate));
static struct dirtemplate mastertemplate = {
static struct dirtemplate omastertemplate = {
struct dirtemplate *dirbuf;
#define DOTDOT_OFFSET offsetof(struct dirtemplate, dotdot_ino)
#define DOT_OFFSET offsetof(struct dirtemplate, dot_ino)
struct dirtemplate dbuf;
#define MINDIRSIZ (sizeof (struct dirtemplate) / 2)
struct dirtemplate dirbuf;
sizeof (struct dirtemplate), (off_t)0, UIO_SYSSPACE,
static struct dirtemplate mastertemplate = {
struct dirtemplate dirtemplate, *dtp;
dtp = (struct dirtemplate *)&omastertemplate;
dirtemplate = *dtp;
dirtemplate.dot_ino = ip->i_number;
dirtemplate.dotdot_ino = dp->i_number;
bcopy((caddr_t)&dirtemplate, (caddr_t)bp->b_data, sizeof dirtemplate);