diff --git a/include/sys/stat.h b/include/sys/stat.h index ca7cad70355..4b88ed4a417 100644 --- a/include/sys/stat.h +++ b/include/sys/stat.h @@ -124,13 +124,19 @@ struct stat { /* Required, standard fields */ + dev_t st_dev; /* Device ID of device containing file */ + ino_t st_ino; /* File serial number */ mode_t st_mode; /* File type, attributes, and access mode bits */ + nlink_t st_nlink; /* Number of hard links to the file */ + uid_t st_uid; /* User ID of file */ + gid_t st_gid; /* Group ID of file */ + dev_t st_rdev; /* Device ID (if file is character or block special) */ off_t st_size; /* Size of file/directory, in bytes */ - blksize_t st_blksize; /* Block size used for filesystem I/O */ - blkcnt_t st_blocks; /* Number of blocks allocated */ time_t st_atime; /* Time of last access */ time_t st_mtime; /* Time of last modification */ time_t st_ctime; /* Time of last status change */ + blksize_t st_blksize; /* Block size used for filesystem I/O */ + blkcnt_t st_blocks; /* Number of blocks allocated */ /* Internal fields. These are part this specific implementation and * should not referenced by application code for portability reasons. diff --git a/include/sys/types.h b/include/sys/types.h index c532c159691..b89298e2723 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -165,6 +165,10 @@ typedef uint16_t dev_t; typedef uint16_t ino_t; +/* nlink_t is used for link counts */ + +typedef uint16_t nlink_t; + /* pid_t is used for process IDs and process group IDs. It must be signed because * negative PID values are used to represent invalid PIDs. */