Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-5.10)
Apropos / Subsearch:
optional field

dir_ufs(4)                       File Formats                       dir_ufs(4)

       dir_ufs, dir - format of ufs directories

       #include <&lt;sys/param.h>&gt;

       #include <&lt;sys/types.h>&gt;

       #include <&lt;sys/fs/ufs_fsdir.h>&gt;

       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.

       #define DIRBLKSIZ                        DEV_BSIZE
       #define MAXNAMLEN                        256
       struct direct {
               ulong_t  d_ino;                  /* inode number of entry */
               ushort_t d_reclen;               /* length of this record */
               ushort_t d_namlen;               /* length of string in d_name */
               char     d_name[MAXNAMLEN + 1];  /* maximum name length */

       See attributes(5) for a description of the following attributes:

       tab()     allbox;     cw(2.750000i)|    cw(2.750000i)    lw(2.750000i)|
       lw(2.750000i).  ATTRIBUTE TYPEATTRIBUTE VALUE Interface StabilityUnsta-

       attributes(5), ufs(7FS)

SunOS 5.10                        16 Apr 2003                       dir_ufs(4)