mirror of https://github.com/mkerrisk/man-pages
statx.2: srcfix: rewrap source lines
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
6a4667aaa3
commit
14b5d02a46
96
man2/statx.2
96
man2/statx.2
|
@ -113,11 +113,11 @@ struct statx_timestamp {
|
||||||
.SS
|
.SS
|
||||||
Invoking \fBstatx\fR():
|
Invoking \fBstatx\fR():
|
||||||
.PP
|
.PP
|
||||||
To access a file's status, no permissions are required on the file itself, but
|
To access a file's status, no permissions are required on the file itself,
|
||||||
in the case of
|
but in the case of
|
||||||
.BR statx ()
|
.BR statx ()
|
||||||
with a path, execute (search) permission is required on all of the directories
|
with a path,
|
||||||
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.
|
||||||
.PP
|
.PP
|
||||||
|
@ -133,7 +133,8 @@ to locate the target file in one of a variety of ways:
|
||||||
.I pathname
|
.I pathname
|
||||||
points to an absolute path and
|
points to an absolute path and
|
||||||
.I dirfd
|
.I dirfd
|
||||||
is ignored. The file is looked up by name, starting from the root of the
|
is ignored.
|
||||||
|
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 path.
|
||||||
|
@ -148,18 +149,20 @@ The file is looked up by name, starting from the current working directory.
|
||||||
.I pathname
|
.I pathname
|
||||||
points to relative path and
|
points to relative path and
|
||||||
.I dirfd
|
.I dirfd
|
||||||
indicates a file descriptor pointing to a directory. The file is looked up by
|
indicates a file descriptor pointing to a directory.
|
||||||
name, starting from the directory specified by
|
The file is looked up by name, starting from the directory specified by
|
||||||
.IR dirfd .
|
.IR dirfd .
|
||||||
.TP
|
.TP
|
||||||
[*] By file descriptor.
|
[*] By file descriptor.
|
||||||
.IR pathname " is " NULL " and " dirfd
|
.IR pathname " is " NULL " and " dirfd
|
||||||
indicates a file descriptor. The file attached to the file descriptor is
|
indicates a file descriptor.
|
||||||
queried directly. The file descriptor may point to any type of file, not just
|
The file attached to the file descriptor is queried directly.
|
||||||
|
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. A value for
|
can be used to influence a path-based lookup.
|
||||||
|
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:
|
||||||
.TP
|
.TP
|
||||||
|
@ -210,22 +213,25 @@ instead return information about the link itself, like
|
||||||
.BR lstat (2).
|
.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 synchronization the kernel will do
|
||||||
when querying a file on a remote filesystem. This is done by OR'ing in one of
|
when querying a file on a remote filesystem.
|
||||||
the following values:
|
This is done by OR'ing in one of the following values:
|
||||||
.TP
|
.TP
|
||||||
AT_STATX_SYNC_AS_STAT
|
AT_STATX_SYNC_AS_STAT
|
||||||
Do whatever
|
Do whatever
|
||||||
.BR stat (2)
|
.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
|
||||||
Force the attributes to be synchronised with the server. This may require that
|
Force the attributes to be synchronised with the server.
|
||||||
|
This may require that
|
||||||
a network filesystem perform a data writeback to get the timestamps correct.
|
a network filesystem perform a data writeback to get the timestamps correct.
|
||||||
.TP
|
.TP
|
||||||
AT_STATX_DONT_SYNC
|
AT_STATX_DONT_SYNC
|
||||||
Don't synchronise anything, but rather just take whatever the system has cached
|
Don't synchronise anything, but rather just take whatever the system has cached
|
||||||
if possible. This may mean that the information returned is approximate, but,
|
if possible.
|
||||||
|
This may mean that the information returned is approximate, but,
|
||||||
on a network filesystem, it may not involve a round trip to the server - even
|
on a network filesystem, it may not involve a round trip to the server - even
|
||||||
if no lease is held.
|
if no lease is held.
|
||||||
.PP
|
.PP
|
||||||
|
@ -278,7 +284,8 @@ which fields have been filled in.
|
||||||
.PP
|
.PP
|
||||||
It should be noted that the kernel may return fields that weren't requested and
|
It should be noted that the kernel may return fields that weren't requested and
|
||||||
may fail to return fields that were requested, depending on what the backing
|
may fail to return fields that were requested, depending on what the backing
|
||||||
filesystem supports. In either case,
|
filesystem supports.
|
||||||
|
In either case,
|
||||||
.I stx_mask
|
.I stx_mask
|
||||||
will not be equal
|
will not be equal
|
||||||
.IR mask .
|
.IR mask .
|
||||||
|
@ -292,11 +299,10 @@ 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. If this happens, the corresponding
|
values for them available at no extra cost.
|
||||||
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:
|
.I Note:
|
||||||
|
@ -327,7 +333,8 @@ Apart from stx_mask (which is described above), the fields in the
|
||||||
structure are:
|
structure are:
|
||||||
.TP
|
.TP
|
||||||
.I stx_mode
|
.I stx_mode
|
||||||
The file type and mode. This is described in more detail below.
|
The file type and mode.
|
||||||
|
This is described in more detail below.
|
||||||
.TP
|
.TP
|
||||||
.I stx_size
|
.I stx_size
|
||||||
The size of the file (if it is a regular file or a symbolic link) in bytes.
|
The size of the file (if it is a regular file or a symbolic link) in bytes.
|
||||||
|
@ -341,7 +348,8 @@ 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. (Writing to a file in
|
The "preferred" blocksize for efficient filesystem I/O.
|
||||||
|
(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
|
||||||
.I stx_nlink
|
.I stx_nlink
|
||||||
|
@ -378,32 +386,33 @@ Other routines, such as
|
||||||
may or may not update it.
|
may or may not update it.
|
||||||
.TP
|
.TP
|
||||||
.I stx_btime
|
.I stx_btime
|
||||||
The file's creation timestamp. This is set on file creation and not changed
|
The file's creation timestamp.
|
||||||
subsequently.
|
This is set on file creation and not changed subsequently.
|
||||||
.TP
|
.TP
|
||||||
.I stx_ctime
|
.I stx_ctime
|
||||||
The file's last status change timestamp. This field is changed by writing or
|
The file's last status change timestamp.
|
||||||
|
This field is changed by writing or
|
||||||
by setting inode information (i.e., owner, group, link count, mode, etc.).
|
by setting inode information (i.e., owner, group, link count, mode, etc.).
|
||||||
.TP
|
.TP
|
||||||
.I stx_mtime
|
.I stx_mtime
|
||||||
The file's last modification timestamp. This is changed by file modifications,
|
The file's last modification timestamp.
|
||||||
|
This is changed by file modifications,
|
||||||
for example, by
|
for example, by
|
||||||
.BR mknod (2),
|
.BR mknod (2),
|
||||||
.BR truncate (2),
|
.BR truncate (2),
|
||||||
.BR utime (2),
|
.BR utime (2),
|
||||||
and
|
and
|
||||||
.BR write (2)
|
.BR write (2)
|
||||||
(of more than zero bytes). Moreover, the modification time of a directory is
|
(of more than zero bytes).
|
||||||
changed by the creation or deletion of files in that directory. This field is
|
Moreover, the modification time of a directory is
|
||||||
|
changed by the creation or deletion of files in that directory.
|
||||||
|
This field is
|
||||||
.I not
|
.I not
|
||||||
changed for changes in owner, group, hard link count, or mode.
|
changed for changes in owner, group, hard link count, or mode.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
Not all of the Linux filesystems implement all of the timestamp fields. Some
|
Not all of the Linux filesystems implement all of the timestamp fields.
|
||||||
filesystems allow mounting in such a way that file and/or directory accesses do
|
Some filesystems allow mounting in such a way that file and/or
|
||||||
not cause an update of the
|
directory accesses do not cause an update of the
|
||||||
.I stx_atime
|
.I stx_atime
|
||||||
field.
|
field.
|
||||||
(See
|
(See
|
||||||
|
@ -421,7 +430,7 @@ is not updated if a file is opened with the
|
||||||
.BR O_NOATIME ;
|
.BR O_NOATIME ;
|
||||||
see
|
see
|
||||||
.BR open (2).
|
.BR open (2).
|
||||||
|
.\"
|
||||||
.SS File attributes
|
.SS File attributes
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
|
@ -434,15 +443,19 @@ The file is compressed by the fs and may take extra resources to access.
|
||||||
.TP
|
.TP
|
||||||
STATX_ATTR_IMMUTABLE
|
STATX_ATTR_IMMUTABLE
|
||||||
The file cannot be modified: it cannot be deleted or renamed, no hard links can
|
The file cannot be modified: it cannot be deleted or renamed, no hard links can
|
||||||
be created to this file and no data can be written to it. See chattr(1).
|
be created to this file and no data can be written to it.
|
||||||
|
See chattr(1).
|
||||||
.TP
|
.TP
|
||||||
STATX_ATTR_APPEND
|
STATX_ATTR_APPEND
|
||||||
The file can only be opened in append mode for writing. Random access writing
|
The file can only be opened in append mode for writing.
|
||||||
is not permitted. See chattr(1).
|
Random access writing
|
||||||
|
is not permitted.
|
||||||
|
See chattr(1).
|
||||||
.TP
|
.TP
|
||||||
STATX_ATTR_NODUMP
|
STATX_ATTR_NODUMP
|
||||||
File is not a candidate for backup when a backup program such as dump(8) is
|
File is not a candidate for backup when a backup program such as dump(8) is
|
||||||
run. See chattr(1).
|
run.
|
||||||
|
See chattr(1).
|
||||||
.TP
|
.TP
|
||||||
STATX_ATTR_ENCRYPTED
|
STATX_ATTR_ENCRYPTED
|
||||||
A key is required for the file to be encrypted by the filesystem.
|
A key is required for the file to be encrypted by the filesystem.
|
||||||
|
@ -450,7 +463,8 @@ A key is required for the file to be encrypted by the filesystem.
|
||||||
.PP
|
.PP
|
||||||
The
|
The
|
||||||
.I stx_mode
|
.I stx_mode
|
||||||
field contains the combined file type and mode. POSIX refers to the bits in
|
field contains the combined file type and mode.
|
||||||
|
POSIX refers to the bits in
|
||||||
this field corresponding to the mask
|
this field corresponding to the mask
|
||||||
.B S_IFMT
|
.B S_IFMT
|
||||||
(see below) as the
|
(see below) as the
|
||||||
|
@ -604,8 +618,6 @@ on a directory means that a file
|
||||||
in that directory can be renamed or deleted only by the owner
|
in that directory can be renamed or deleted only by the owner
|
||||||
of the file, by the owner of the directory, and by a privileged
|
of the file, by the owner of the directory, and by a privileged
|
||||||
process.
|
process.
|
||||||
|
|
||||||
|
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
On success, zero is returned.
|
On success, zero is returned.
|
||||||
On error, \-1 is returned, and
|
On error, \-1 is returned, and
|
||||||
|
|
Loading…
Reference in New Issue