Changeset View
Changeset View
Standalone View
Standalone View
head/share/man/man5/dir.5
Show All 22 Lines | |||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
.\" SUCH DAMAGE. | .\" SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" @(#)dir.5 8.3 (Berkeley) 4/19/94 | .\" @(#)dir.5 8.3 (Berkeley) 4/19/94 | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd June 20, 2018 | .Dd November 14, 2018 | ||||
.Dt DIR 5 | .Dt DIR 5 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm dir , | .Nm dir , | ||||
.Nm dirent | .Nm dirent | ||||
.Nd directory file format | .Nd directory file format | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.In dirent.h | .In dirent.h | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
* Explicit pad is added between the last member of the header and | * Explicit pad is added between the last member of the header and | ||||
* d_name, to avoid having the ABI padding in the end of dirent on | * d_name, to avoid having the ABI padding in the end of dirent on | ||||
* LP64 arches. There is code depending on d_name being last. Also, | * LP64 arches. There is code depending on d_name being last. Also, | ||||
* keeping this pad for ILP32 architectures simplifies compat32 layer. | * keeping this pad for ILP32 architectures simplifies compat32 layer. | ||||
*/ | */ | ||||
struct dirent { | struct dirent { | ||||
ino_t d_fileno; /* file number of entry */ | ino_t d_fileno; /* file number of entry */ | ||||
off_t d_off; /* directory offset of entry */ | off_t d_off; /* directory offset of the next entry */ | ||||
__uint16_t d_reclen; /* length of this record */ | __uint16_t d_reclen; /* length of this record */ | ||||
__uint8_t d_type; /* file type, see below */ | __uint8_t d_type; /* file type, see below */ | ||||
__uint8_t d_namlen; /* length of string in d_name */ | __uint8_t d_namlen; /* length of string in d_name */ | ||||
__uint32_t d_pad0; | __uint32_t d_pad0; | ||||
#if __BSD_VISIBLE | #if __BSD_VISIBLE | ||||
#define MAXNAMLEN 255 | #define MAXNAMLEN 255 | ||||
char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */ | char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */ | ||||
#else | #else | ||||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |