statx.2: Minor wording and formatting fix-ups

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-04-21 16:42:39 +02:00
parent 9905e59b55
commit 6a4667aaa3
1 changed files with 39 additions and 25 deletions

View File

@ -67,35 +67,44 @@ The buffer is filled in according to the following type:
.in +4n .in +4n
.nf .nf
struct statx { struct statx {
__u32 stx_mask; -- Mask of bits indicating filled fields __u32 stx_mask; /* Mask of bits indicating
__u32 stx_blksize; -- Block size for filesystem I/O filled fields */
__u64 stx_attributes; -- Extra file attribute indicators __u32 stx_blksize; /* Block size for filesystem I/O */
__u32 stx_nlink; -- Number of hard links __u64 stx_attributes; /* Extra file attribute indicators */
__u32 stx_uid; -- User ID of owner __u32 stx_nlink; /* Number of hard links */
__u32 stx_gid; -- Group ID of owner __u32 stx_uid; /* User ID of owner */
__u16 stx_mode; -- File type and mode __u32 stx_gid; /* Group ID of owner */
__u64 stx_ino; -- Inode number __u16 stx_mode; /* File type and mode */
__u64 stx_size; -- Total size in bytes __u64 stx_ino; /* Inode number */
__u64 stx_blocks; -- Number of 512B blocks allocated __u64 stx_size; /* Total size in bytes */
struct statx_timestamp stx_atime; -- Time of last access __u64 stx_blocks; /* Number of 512B blocks allocated */
struct statx_timestamp stx_btime; -- Time of creation
struct statx_timestamp stx_ctime; -- Time of last status change /* The following fields are file timestamps */
struct statx_timestamp stx_mtime; -- Time of last modification struct statx_timestamp stx_atime; /* Last access */
__u32 stx_rdev_major; } Device number if device file struct statx_timestamp stx_btime; /* Creation */
__u32 stx_rdev_minor; } struct statx_timestamp stx_ctime; /* Last status change */
__u32 stx_dev_major; } Device number of containing file struct statx_timestamp stx_mtime; /* Last modification */
__u32 stx_dev_minor; }
/* If this file represents device, then the next two feilds
contain the ID of the device */
__u32 stx_rdev_major; /* Major ID */
__u32 stx_rdev_minor; /* Minor ID */
/* The next two fields contain the ID of the device
contain the filesystem where the file resides */
__u32 stx_dev_major; /* Major ID */
__u32 stx_dev_minor; /* Minor ID */
}; };
.fi .fi
.in .in
.PP .PP
Where the timestamps are defined as: The file timestamps are structures of the following type:
.PP .PP
.in +4n .in +4n
.nf .nf
struct statx_timestamp { struct statx_timestamp {
__s64 tv_sec; -- Number of seconds (UNIX time) __s64 tv_sec; /* Seconds since the Epoch (UNIX time) */
__s32 tv_nsec; -- Number of nanoseconds before or since tv_sec __s32 tv_nsec; /* Nanoseconds before or since tv_sec */
}; };
.fi .fi
.in .in
@ -114,7 +123,10 @@ that lead to the file.
.PP .PP
.BR statx () .BR statx ()
uses uses
.IR pathname ", " dirfd " and " flags .IR pathname ,
.IR dirfd ,
and
.IR flags
to locate the target file in one of a variety of ways: to locate the target file in one of a variety of ways:
.TP .TP
[*] By absolute path. [*] By absolute path.
@ -127,7 +139,9 @@ filesystem as seen by the calling process.
[*] By cwd-relative path. [*] By cwd-relative path.
.I pathname .I pathname
points to a relative path and points to a relative path and
.IR dirfd " is " AT_FDCWD . .IR dirfd
is
.BR AT_FDCWD .
The file is looked up by name, starting from the current working directory. The file is looked up by name, starting from the current working directory.
.TP .TP
[*] By dir-relative path. [*] By dir-relative path.
@ -193,7 +207,7 @@ If
.I pathname .I pathname
is a symbolic link, do not dereference it: is a symbolic link, do not dereference it:
instead return information about the link itself, like instead return information about the link itself, like
.BR lstat (). .BR lstat (2).
.PP .PP
.I flags .I flags
can also be used to control what sort of synchronisation the kernel will do can also be used to control what sort of synchronisation the kernel will do
@ -202,7 +216,7 @@ the following values:
.TP .TP
AT_STATX_SYNC_AS_STAT AT_STATX_SYNC_AS_STAT
Do whatever Do whatever
.BR stat () .BR stat (2)
does. This is the default and is very much filesystem specific. does. This is the default and is very much filesystem specific.
.TP .TP
AT_STATX_FORCE_SYNC AT_STATX_FORCE_SYNC