inode(4)
NAME
inode − format of an inode
SYNOPSIS
#include <sys/types.h>
#include <sys/ino.h>
DESCRIPTION
An inode for a plain file or directory in a file system has the following structure defined by <sys/ino.h>.
/* Inode structure as it appears on a disk block */
struct dinode {
u_short di_mode; /* mode and type of file */
short di_nlink; /* number of links to file */
short di_uid; /* owner’s user id */
short di_gid; /* owner’s group id */
quad di_size; /* number of bytes in file */
time_t di_atime; /* time last accessed */
long di_atspare;
time_t di_mtime; /* time last modified */
long di_mtspare;
time_t di_ctime; /* time of last file status change */
long di_ctspare;
daddr_t di_db[NDADDR]; /* disk block addresses */
daddr_t di_ib[NIADDR]; /* indirect blocks */
long di_flags; /* status, currently unused */
long di_blocks; /* blocks actually held */
long di_gen; /* file generation number */
long di_fversion; /* file version number */
long di_spare[2]; /* reserved, currently unused */
ino_t di_contin; /* continuation inode number */
};
A continuation inode contains a file’s optional access control list (ACL) entries, and has the following structure:
/* Continuation inode as it appears on a disk block */
struct cinode {
u_short ci_mode; /* mode and type of file */
short ci_nlink; /* number of links to file */
/* optional ACL entries */
struct acl_entry ci_acl[NOPTENTRIES];
char ci_spare[46]; /* reserved, currently unused */
};
For the meaning of the defined types u_short, quad, daddr_t, and time_t, see types(5).
Continuation inodes are distinguished from other inodes by their file type. See /usr/include/sys/inode.h for the definition of these values.
See /usr/include/sys/inode.h for the definition of inode structures for special files, pipes, or FIFO s.
WARNINGS
Access Control Lists
Access control list descriptions in this entry apply only to standard HP-UX operating systems. If HP-UX BLS software has been installed, access control lists are handled differently. Refer to HP-UX BLS documentation for information about access control lists in the HP-UX BLS environment.
FILES
/usr/include/sys/ino.h
AUTHOR
AT&T, the University of California, Berkeley and HP.
SEE ALSO
Hewlett-Packard Company — HP-UX Release 9.0: August 1992