mirror of https://github.com/mkerrisk/man-pages
statx.2: Rework discussion of identification of target file
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
c8701bafb9
commit
7e43caf4db
48
man2/statx.2
48
man2/statx.2
|
@ -118,38 +118,48 @@ and
|
||||||
.IR flags
|
.IR flags
|
||||||
identify the target file in one of the following ways:
|
identify the target file in one of the following ways:
|
||||||
.TP
|
.TP
|
||||||
[*] By absolute pathname.
|
An absolute pathname
|
||||||
|
If
|
||||||
.I pathname
|
.I pathname
|
||||||
points to an absolute pathname and
|
begins with a slash,
|
||||||
|
then it is an absolute pathname that identifies the target file.
|
||||||
|
In this case,
|
||||||
.I dirfd
|
.I dirfd
|
||||||
is ignored.
|
is ignored.
|
||||||
The file is looked up by name, starting from the root of the
|
|
||||||
filesystem as seen by the calling process.
|
|
||||||
.TP
|
.TP
|
||||||
[*] By cwd-relative pathname.
|
A relative pathname
|
||||||
|
If
|
||||||
.I pathname
|
.I pathname
|
||||||
points to a relative pathname and
|
is a string that begins with a character other than a slash 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.
|
then
|
||||||
.TP
|
|
||||||
[*] By dir-relative pathname.
|
|
||||||
.I pathname
|
.I pathname
|
||||||
points to relative pathname and
|
is a relative pathname that is interpreted relative to the process's
|
||||||
|
current working directory.
|
||||||
|
.TP
|
||||||
|
A pathname interpreted relative to a directory file descriptor
|
||||||
|
If
|
||||||
|
.I pathname
|
||||||
|
is a string that begins with a character other than a slash and
|
||||||
.I dirfd
|
.I dirfd
|
||||||
is a file descriptor referring to a directory.
|
is a file descriptor that refers to a directory, then
|
||||||
The file is looked up by name, starting from the directory specified by
|
.I pathname
|
||||||
|
is a relative pathname that is interpreted relative to the directory
|
||||||
|
referred to by
|
||||||
.IR dirfd .
|
.IR dirfd .
|
||||||
.TP
|
.TP
|
||||||
[*] By file descriptor.
|
By file descriptor
|
||||||
|
If
|
||||||
.IR pathname
|
.IR pathname
|
||||||
is NULL and
|
is NULL, then the target file is the one referred to by the file descriptor
|
||||||
|
.IR dirfd .
|
||||||
.I dirfd
|
.I dirfd
|
||||||
is a file descriptor.
|
may refer to any type of file, not just a directory.
|
||||||
The file attached to the file descriptor is queried directly.
|
(The
|
||||||
The file descriptor may refer to any type of file, not just
|
.B AT_EMPTY_PATH
|
||||||
a directory.
|
flag described below provides similar functionality.)
|
||||||
.PP
|
.PP
|
||||||
.I flags
|
.I flags
|
||||||
can be used to influence a pathname-based lookup.
|
can be used to influence a pathname-based lookup.
|
||||||
|
|
Loading…
Reference in New Issue