1dir_ufs(4)                       File Formats                       dir_ufs(4)
2
3
4

NAME

6       dir_ufs, dir - format of ufs directories
7

SYNOPSIS

9       #include <sys/param.h>
10
11
12       #include <sys/types.h>
13
14
15       #include <sys/fs/ufs_fsdir.h>
16
17

DESCRIPTION

19       A directory consists of some number of blocks of DIRBLKSIZ bytes, where
20       DIRBLKSIZ is chosen such that it can be transferred to disk in a single
21       atomic operation, for example, 512 bytes on most machines.
22
23
24       Each   DIRBLKSIZ-byte  block  contains  some  number of directory entry
25       structures, which are of variable length.  Each directory entry  has  a
26       struct  direct  at  the  front  of it, containing its inode number, the
27       length of the entry, and the length of the name contained in the entry.
28       These entries are followed by the name padded to a 4 byte boundary with
29       null bytes.  All names  are  guaranteed  null-terminated.  The  maximum
30       length of a name in a directory is  MAXNAMLEN.
31
32         #define DIRBLKSIZ                       DEV_BSIZE
33         #define MAXNAMLEN                       256
34         struct direct {
35                 ulong_t  d_ino;                 /* inode number of entry */
36                 ushort_t d_reclen;              /* length of this record */
37                 ushort_t d_namlen;              /* length of string in d_name */
38                 char     d_name[MAXNAMLEN + 1]; /* maximum name length */
39         };
40
41

ATTRIBUTES

43       See attributes(5) for a description of the following attributes:
44
45
46
47
48       ┌─────────────────────────────┬─────────────────────────────┐
49       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
50       ├─────────────────────────────┼─────────────────────────────┤
51       │Interface Stability          │Unstable                     │
52       └─────────────────────────────┴─────────────────────────────┘
53

SEE ALSO

55       attributes(5), ufs(7FS)
56
57
58
59SunOS 5.11                        16 Apr 2003                       dir_ufs(4)
Impressum