Project

General

Profile

Bug #7140

stat(2): The time related members of the stat structure should be timestruc_t instead of time_t

Added by Marcel Telka about 4 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
manpage - manual pages
Start date:
2016-06-25
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

Here in the stat(2) man page:

       The buf argument is a pointer to a stat structure into which
       information is placed concerning the file. A stat structure includes
       the following members:

         mode_t   st_mode;          /* File mode (see mknod(2)) */
         ino_t    st_ino;           /* Inode number */
         dev_t    st_dev;           /* ID of device containing */
                                    /* a directory entry for this file */
         dev_t    st_rdev;          /* ID of device */
                                    /* This entry is defined only for */
                                    /* char special or block special files */
         nlink_t  st_nlink;         /* Number of links */
         uid_t    st_uid;           /* User ID of the file's owner */
         gid_t    st_gid;           /* Group ID of the file's group */
         off_t    st_size;          /* File size in bytes */
         time_t   st_atime;         /* Time of last access */
         time_t   st_mtime;         /* Time of last data modification */
         time_t   st_ctime;         /* Time of last file status change */
                                    /* Times measured in seconds since */
                                    /* 00:00:00 UTC, Jan. 1, 1970 */
         long     st_blksize;       /* Preferred I/O block size */
         blkcnt_t st_blocks;        /* Number of 512 byte blocks allocated*/
         char     st_fstype[_ST_FSTYPSZ];
                                    /* Null-terminated type of filesystem */

the types for st_atime, st_mtime, and st_ctime should be changed from time_t to timestruc_t. Also, the members name should not contain the trailing 'e' (i.e. st_atime -> st_atim, st_mtime -> st_mtim, st_ctime -> st_ctim). Finally, the list of the stat struct members should be reordered to follow both the implementation in sys/stat.h and POSIX.

Also available in: Atom PDF