dir_ufs(4)
NAME
dir_ufs, dir − format of ufs directories
SYNOPSIS
#include <sys/param.h>
#include <sys/types.h>
#include <sys/fs/ufs_fsdir.h>
DESCRIPTION
A directory consists of some number of blocks of DIRBLKSIZ bytes, where DIRBLKSIZ is chosen such that it can be transferred to disk in a single atomic operation (for example, 512 bytes on most machines).
Each DIRBLKSIZ-byte block contains some number of directory entry structures, which are of variable length. Each directory entry has a struct direct at the front of it, containing its inode number, the length of the entry, and the length of the name contained in the entry. These entries are followed by the name padded to a 4 byte boundary with null bytes. All names are guaranteed null-terminated. The maximum length of a name in a directory is MAXNAMLEN.
#defineDIRBLKSIZDEV_BSIZE
#defineMAXNAMLEN256
struct direct {
u_longd_ino;/∗ inode number of entry ∗/
u_shortd_reclen; /∗ length of this record ∗/
u_shortd_namlen; /∗ length of string in d_name ∗/
chard_name[MAXNAMLEN + 1]; /∗ name must be no longer than this ∗/
};
ATTRIBUTES
See attributes(5) for a description of the following attributes:
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
| Stability Level | Unstable |
SEE ALSO
SunOS 5.6 — Last change: 3 Jul 1990