statx.2: Minor edits

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-04-22 21:15:56 +02:00
parent 108cd6a3d0
commit 835f429363
1 changed files with 16 additions and 19 deletions

View File

@ -30,17 +30,14 @@
.\" .\"
.TH STATX 2 2017-03-07 "Linux" "Linux Programmer's Manual" .TH STATX 2 2017-03-07 "Linux" "Linux Programmer's Manual"
.SH NAME .SH NAME
statx \- Get file status (extended) statx \- get file status (extended)
.SH SYNOPSIS .SH SYNOPSIS
.nf .nf
.B #include <sys/types.h> .B #include <sys/types.h>
.br
.B #include <sys/stat.h> .B #include <sys/stat.h>
.br
.B #include <unistd.h> .B #include <unistd.h>
.br
.BR "#include <fcntl.h> " "/* Definition of AT_* constants */" .BR "#include <fcntl.h> " "/* Definition of AT_* constants */"
.sp
.BI "int statx(int " dirfd ", const char *" pathname ", int " flags "," .BI "int statx(int " dirfd ", const char *" pathname ", int " flags ","
.BI " unsigned int " mask ", struct statx *" buf ); .BI " unsigned int " mask ", struct statx *" buf );
.fi .fi
@ -116,7 +113,7 @@ Invoking \fBstatx\fR():
To access a file's status, no permissions are required on the file itself, To access a file's status, no permissions are required on the file itself,
but in the case of but in the case of
.BR statx () .BR statx ()
with a path, with a pathname,
execute (search) permission is required on all of the directories in execute (search) permission is required on all of the directories in
.I pathname .I pathname
that lead to the file. that lead to the file.
@ -129,25 +126,25 @@ and
.IR flags .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 pathname.
.I pathname .I pathname
points to an absolute path and points to an absolute pathname and
.I dirfd .I dirfd
is ignored. is ignored.
The file is looked up by name, starting from the root of the The file is looked up by name, starting from the root of the
filesystem as seen by the calling process. filesystem as seen by the calling process.
.TP .TP
[*] By cwd-relative path. [*] By cwd-relative pathname.
.I pathname .I pathname
points to a relative path and points to a relative pathname and
.IR dirfd .IR dirfd
is is
.BR AT_FDCWD . .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 pathname.
.I pathname .I pathname
points to relative path and points to relative pathname and
.I dirfd .I dirfd
indicates a file descriptor pointing to a directory. indicates a file descriptor pointing to a directory.
The file is looked up by name, starting from the directory specified by The file is looked up by name, starting from the directory specified by
@ -163,7 +160,7 @@ The file descriptor may point to any type of file, not just
a directory. a directory.
.PP .PP
.I flags .I flags
can be used to influence a path-based lookup. can be used to influence a pathname-based lookup.
A value for A value for
.I flags .I flags
is constructed by OR'ing together zero or more of the following constants: is constructed by OR'ing together zero or more of the following constants:
@ -299,18 +296,18 @@ an unrepresentable value (for instance, a file with an exotic type),
then the mask bit corresponding to that field will be cleared in then the mask bit corresponding to that field will be cleared in
.I stx_mask .I stx_mask
even if the user asked for it and a dummy value will be filled in for even if the user asked for it and a dummy value will be filled in for
compatibility purposes if one is available (e.g. a dummy uid and gid may be compatibility purposes if one is available (e.g., a dummy UID and GID may be
specified to mount under some circumstances). specified to mount under some circumstances).
.PP .PP
A filesystem may also fill in fields that the caller didn't ask for if it has A filesystem may also fill in fields that the caller didn't ask for if it has
values for them available at no extra cost. values for them available and the information is available at no extra cost.
If this happens, the corresponding bits will be set in If this happens, the corresponding bits will be set in
.IR stx_mask . .IR stx_mask .
.PP .PP
.\" Background: inode attributes are modified with i_mutex held, but .\" Background: inode attributes are modified with i_mutex held, but
.\" read by stat() without taking the mutex. .\" read by stat() without taking the mutex.
.I Note: .IR Note :
For performance and simplicity reasons, different fields in the for performance and simplicity reasons, different fields in the
.I statx .I statx
structure may contain state information from different moments structure may contain state information from different moments
during the execution of the system call. during the execution of the system call.
@ -354,7 +351,7 @@ The number of blocks allocated to the file on the medium, in 512-byte units.
when the file has holes.) when the file has holes.)
.TP .TP
.I stx_blksize .I stx_blksize
The "preferred" blocksize for efficient filesystem I/O. The "preferred" block size for efficient filesystem I/O.
(Writing to a file in (Writing to a file in
smaller chunks may cause an inefficient read-modify-rewrite.) smaller chunks may cause an inefficient read-modify-rewrite.)
.TP .TP
@ -654,7 +651,7 @@ is not a valid open file descriptor.
Bad address. Bad address.
.TP .TP
.B ELOOP .B ELOOP
Too many symbolic links encountered while traversing the path. Too many symbolic links encountered while traversing the pathname.
.TP .TP
.B ENAMETOOLONG .B ENAMETOOLONG
.I pathname .I pathname