+ bzero(sb64, sizeof(*sb64));
+ sb64->st_mode = S_IFIFO | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
+ sb64->st_blksize = pipe_size;
+ sb64->st_size = pipe_count;
+ sb64->st_blocks = (sb64->st_size + sb64->st_blksize - 1) / sb64->st_blksize;
+
+ sb64->st_uid = kauth_getuid();
+ sb64->st_gid = kauth_getgid();
+
+ sb64->st_atimespec.tv_sec = cpipe->st_atimespec.tv_sec;
+ sb64->st_atimespec.tv_nsec = cpipe->st_atimespec.tv_nsec;
+
+ sb64->st_mtimespec.tv_sec = cpipe->st_mtimespec.tv_sec;
+ sb64->st_mtimespec.tv_nsec = cpipe->st_mtimespec.tv_nsec;
+
+ sb64->st_ctimespec.tv_sec = cpipe->st_ctimespec.tv_sec;
+ sb64->st_ctimespec.tv_nsec = cpipe->st_ctimespec.tv_nsec;
+
+ /*
+ * Return a relatively unique inode number based on the current
+ * address of this pipe's struct pipe. This number may be recycled
+ * relatively quickly.
+ */
+ sb64->st_ino = (ino64_t)((uint32_t)cpipe);
+ } else {
+ sb = (struct stat *)ub;
+
+ bzero(sb, sizeof(*sb));
+ sb->st_mode = S_IFIFO | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;
+ sb->st_blksize = pipe_size;
+ sb->st_size = pipe_count;
+ sb->st_blocks = (sb->st_size + sb->st_blksize - 1) / sb->st_blksize;
+
+ sb->st_uid = kauth_getuid();
+ sb->st_gid = kauth_getgid();
+
+ sb->st_atimespec.tv_sec = cpipe->st_atimespec.tv_sec;
+ sb->st_atimespec.tv_nsec = cpipe->st_atimespec.tv_nsec;
+
+ sb->st_mtimespec.tv_sec = cpipe->st_mtimespec.tv_sec;
+ sb->st_mtimespec.tv_nsec = cpipe->st_mtimespec.tv_nsec;