Blame man2/statx.2

Packit 7cfc04
'\" t
Packit 7cfc04
.\" Copyright (c) 2017 David Howells <dhowells@redhat.com>
Packit 7cfc04
.\"
Packit 7cfc04
.\" Derived from the stat.2 manual page:
Packit 7cfc04
.\"   Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
Packit 7cfc04
.\"   Parts Copyright (c) 1995 Nicolai Langfeldt (janl@ifi.uio.no), 1/1/95
Packit 7cfc04
.\"   and Copyright (c) 2006, 2007, 2014 Michael Kerrisk <mtk.manpages@gmail.com>
Packit 7cfc04
.\"
Packit 7cfc04
.\" %%%LICENSE_START(VERBATIM)
Packit 7cfc04
.\" Permission is granted to make and distribute verbatim copies of this
Packit 7cfc04
.\" manual provided the copyright notice and this permission notice are
Packit 7cfc04
.\" preserved on all copies.
Packit 7cfc04
.\"
Packit 7cfc04
.\" Permission is granted to copy and distribute modified versions of this
Packit 7cfc04
.\" manual under the conditions for verbatim copying, provided that the
Packit 7cfc04
.\" entire resulting derived work is distributed under the terms of a
Packit 7cfc04
.\" permission notice identical to this one.
Packit 7cfc04
.\"
Packit 7cfc04
.\" Since the Linux kernel and libraries are constantly changing, this
Packit 7cfc04
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
Packit 7cfc04
.\" responsibility for errors or omissions, or for damages resulting from
Packit 7cfc04
.\" the use of the information contained herein.  The author(s) may not
Packit 7cfc04
.\" have taken the same level of care in the production of this manual,
Packit 7cfc04
.\" which is licensed free of charge, as they might when working
Packit 7cfc04
.\" professionally.
Packit 7cfc04
.\"
Packit 7cfc04
.\" Formatted or processed versions of this manual, if unaccompanied by
Packit 7cfc04
.\" the source, must acknowledge the copyright and authors of this work.
Packit 7cfc04
.\" %%%LICENSE_END
Packit 7cfc04
.\"
Packit 7cfc04
.TH STATX 2 2017-09-15 "Linux" "Linux Programmer's Manual"
Packit 7cfc04
.SH NAME
Packit 7cfc04
statx \- get file status (extended)
Packit 7cfc04
.SH SYNOPSIS
Packit 7cfc04
.nf
Packit 7cfc04
.B #include <sys/types.h>
Packit 7cfc04
.B #include <sys/stat.h>
Packit 7cfc04
.B #include <unistd.h>
Packit 7cfc04
.BR "#include <fcntl.h>           " "/* Definition of AT_* constants */"
Packit 7cfc04
.PP
Packit 7cfc04
.BI "int statx(int " dirfd ", const char *" pathname ", int " flags ","
Packit 7cfc04
.BI "          unsigned int " mask ", struct statx *" statxbuf );
Packit 7cfc04
.fi
Packit 7cfc04
.PP
Packit 7cfc04
.IR Note :
Packit 7cfc04
There is no glibc wrapper for
Packit 7cfc04
.BR statx ();
Packit 7cfc04
see NOTES.
Packit 7cfc04
.SH DESCRIPTION
Packit 7cfc04
.PP
Packit 7cfc04
This function returns information about a file, storing it in the buffer
Packit 7cfc04
pointed to by
Packit 7cfc04
.IR statxbuf .
Packit 7cfc04
The returned buffer is a structure of the following type:
Packit 7cfc04
.PP
Packit 7cfc04
.in +4n
Packit 7cfc04
.EX
Packit 7cfc04
struct statx {
Packit 7cfc04
    __u32 stx_mask;        /* Mask of bits indicating
Packit 7cfc04
                              filled fields */
Packit 7cfc04
    __u32 stx_blksize;     /* Block size for filesystem I/O */
Packit 7cfc04
    __u64 stx_attributes;  /* Extra file attribute indicators */
Packit 7cfc04
    __u32 stx_nlink;       /* Number of hard links */
Packit 7cfc04
    __u32 stx_uid;         /* User ID of owner */
Packit 7cfc04
    __u32 stx_gid;         /* Group ID of owner */
Packit 7cfc04
    __u16 stx_mode;        /* File type and mode */
Packit 7cfc04
    __u64 stx_ino;         /* Inode number */
Packit 7cfc04
    __u64 stx_size;        /* Total size in bytes */
Packit 7cfc04
    __u64 stx_blocks;      /* Number of 512B blocks allocated */
Packit 7cfc04
    __u64 stx_attributes_mask;
Packit 7cfc04
                           /* Mask to show what's supported
Packit 7cfc04
                              in stx_attributes */
Packit 7cfc04
Packit 7cfc04
    /* The following fields are file timestamps */
Packit 7cfc04
    struct statx_timestamp stx_atime;  /* Last access */
Packit 7cfc04
    struct statx_timestamp stx_btime;  /* Creation */
Packit 7cfc04
    struct statx_timestamp stx_ctime;  /* Last status change */
Packit 7cfc04
    struct statx_timestamp stx_mtime;  /* Last modification */
Packit 7cfc04
Packit 7cfc04
    /* If this file represents a device, then the next two
Packit 7cfc04
       fields contain the ID of the device */
Packit 7cfc04
    __u32 stx_rdev_major;  /* Major ID */
Packit 7cfc04
    __u32 stx_rdev_minor;  /* Minor ID */
Packit 7cfc04
Packit 7cfc04
    /* The next two fields contain the ID of the device
Packit 7cfc04
       containing the filesystem where the file resides */
Packit 7cfc04
    __u32 stx_dev_major;   /* Major ID */
Packit 7cfc04
    __u32 stx_dev_minor;   /* Minor ID */
Packit 7cfc04
};
Packit 7cfc04
.EE
Packit 7cfc04
.in
Packit 7cfc04
.PP
Packit 7cfc04
The file timestamps are structures of the following type:
Packit 7cfc04
.PP
Packit 7cfc04
.in +4n
Packit 7cfc04
.EX
Packit 7cfc04
struct statx_timestamp {
Packit 7cfc04
    __s64 tv_sec;    /* Seconds since the Epoch (UNIX time) */
Packit 7cfc04
    __u32 tv_nsec;   /* Nanoseconds since tv_sec */
Packit 7cfc04
};
Packit 7cfc04
.EE
Packit 7cfc04
.in
Packit 7cfc04
.PP
Packit 7cfc04
(Note that reserved space and padding is omitted.)
Packit 7cfc04
.SS
Packit 7cfc04
Invoking \fBstatx\fR():
Packit 7cfc04
.PP
Packit 7cfc04
To access a file's status, no permissions are required on the file itself,
Packit 7cfc04
but in the case of
Packit 7cfc04
.BR statx ()
Packit 7cfc04
with a pathname,
Packit 7cfc04
execute (search) permission is required on all of the directories in
Packit 7cfc04
.I pathname
Packit 7cfc04
that lead to the file.
Packit 7cfc04
.PP
Packit 7cfc04
.BR statx ()
Packit 7cfc04
uses
Packit 7cfc04
.IR pathname ,
Packit 7cfc04
.IR dirfd ,
Packit 7cfc04
and
Packit 7cfc04
.IR flags
Packit 7cfc04
to identify the target file in one of the following ways:
Packit 7cfc04
.TP
Packit 7cfc04
An absolute pathname
Packit 7cfc04
If
Packit 7cfc04
.I pathname
Packit 7cfc04
begins with a slash,
Packit 7cfc04
then it is an absolute pathname that identifies the target file.
Packit 7cfc04
In this case,
Packit 7cfc04
.I dirfd
Packit 7cfc04
is ignored.
Packit 7cfc04
.TP
Packit 7cfc04
A relative pathname
Packit 7cfc04
If
Packit 7cfc04
.I pathname
Packit 7cfc04
is a string that begins with a character other than a slash and
Packit 7cfc04
.IR dirfd
Packit 7cfc04
is
Packit 7cfc04
.BR AT_FDCWD ,
Packit 7cfc04
then
Packit 7cfc04
.I pathname
Packit 7cfc04
is a relative pathname that is interpreted relative to the process's
Packit 7cfc04
current working directory.
Packit 7cfc04
.TP
Packit 7cfc04
A directory-relative pathname
Packit 7cfc04
If
Packit 7cfc04
.I pathname
Packit 7cfc04
is a string that begins with a character other than a slash and
Packit 7cfc04
.I dirfd
Packit 7cfc04
is a file descriptor that refers to a directory, then
Packit 7cfc04
.I pathname
Packit 7cfc04
is a relative pathname that is interpreted relative to the directory
Packit 7cfc04
referred to by
Packit 7cfc04
.IR dirfd .
Packit 7cfc04
.TP
Packit 7cfc04
By file descriptor
Packit 7cfc04
If
Packit 7cfc04
.IR pathname
Packit 7cfc04
is an empty string and the
Packit 7cfc04
.B AT_EMPTY_PATH
Packit 7cfc04
flag is specified in
Packit 7cfc04
.IR flags
Packit 7cfc04
(see below),
Packit 7cfc04
then the target file is the one referred to by the file descriptor
Packit 7cfc04
.IR dirfd .
Packit 7cfc04
.PP
Packit 7cfc04
.I flags
Packit 7cfc04
can be used to influence a pathname-based lookup.
Packit 7cfc04
A value for
Packit 7cfc04
.I flags
Packit 7cfc04
is constructed by ORing together zero or more of the following constants:
Packit 7cfc04
.TP
Packit 7cfc04
.BR AT_EMPTY_PATH
Packit 7cfc04
.\" commit 65cfc6722361570bfe255698d9cd4dccaf47570d
Packit 7cfc04
If
Packit 7cfc04
.I pathname
Packit 7cfc04
is an empty string, operate on the file referred to by
Packit 7cfc04
.IR dirfd
Packit 7cfc04
(which may have been obtained using the
Packit 7cfc04
.BR open (2)
Packit 7cfc04
.B O_PATH
Packit 7cfc04
flag).
Packit 7cfc04
In this case,
Packit 7cfc04
.I dirfd
Packit 7cfc04
can refer to any type of file, not just a directory.
Packit 7cfc04
.IP
Packit 7cfc04
If
Packit 7cfc04
.I dirfd
Packit 7cfc04
is
Packit 7cfc04
.BR AT_FDCWD ,
Packit 7cfc04
the call operates on the current working directory.
Packit 7cfc04
.IP
Packit 7cfc04
This flag is Linux-specific; define
Packit 7cfc04
.B _GNU_SOURCE
Packit 7cfc04
.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed
Packit 7cfc04
to obtain its definition.
Packit 7cfc04
.TP
Packit 7cfc04
.BR AT_NO_AUTOMOUNT
Packit 7cfc04
Don't automount the terminal ("basename") component of
Packit 7cfc04
.I pathname
Packit 7cfc04
if it is a directory that is an automount point.
Packit 7cfc04
This allows the caller to gather attributes of an automount point
Packit 7cfc04
(rather than the location it would mount).
Packit 7cfc04
This flag can be used in tools that scan directories
Packit 7cfc04
to prevent mass-automounting of a directory of automount points.
Packit 7cfc04
The
Packit 7cfc04
.B AT_NO_AUTOMOUNT
Packit 7cfc04
flag has no effect if the mount point has already been mounted over.
Packit 7cfc04
This flag is Linux-specific; define
Packit 7cfc04
.B _GNU_SOURCE
Packit 7cfc04
.\" Before glibc 2.16, defining _ATFILE_SOURCE sufficed
Packit 7cfc04
to obtain its definition.
Packit 7cfc04
.TP
Packit 7cfc04
.B AT_SYMLINK_NOFOLLOW
Packit 7cfc04
If
Packit 7cfc04
.I pathname
Packit 7cfc04
is a symbolic link, do not dereference it:
Packit 7cfc04
instead return information about the link itself, like
Packit 7cfc04
.BR lstat (2).
Packit 7cfc04
.PP
Packit 7cfc04
.I flags
Packit 7cfc04
can also be used to control what sort of synchronization the kernel will do
Packit 7cfc04
when querying a file on a remote filesystem.
Packit 7cfc04
This is done by ORing in one of the following values:
Packit 7cfc04
.TP
Packit 7cfc04
.B AT_STATX_SYNC_AS_STAT
Packit 7cfc04
Do whatever
Packit 7cfc04
.BR stat (2)
Packit 7cfc04
does.
Packit 7cfc04
This is the default and is very much filesystem-specific.
Packit 7cfc04
.TP
Packit 7cfc04
.B AT_STATX_FORCE_SYNC
Packit 7cfc04
Force the attributes to be synchronized with the server.
Packit 7cfc04
This may require that
Packit 7cfc04
a network filesystem perform a data writeback to get the timestamps correct.
Packit 7cfc04
.TP
Packit 7cfc04
.B AT_STATX_DONT_SYNC
Packit 7cfc04
Don't synchronize anything, but rather just take whatever
Packit 7cfc04
the system has cached if possible.
Packit 7cfc04
This may mean that the information returned is approximate, but,
Packit 7cfc04
on a network filesystem, it may not involve a round trip to the server - even
Packit 7cfc04
if no lease is held.
Packit 7cfc04
.PP
Packit 7cfc04
The
Packit 7cfc04
.I mask
Packit 7cfc04
argument to
Packit 7cfc04
.BR statx ()
Packit 7cfc04
is used to tell the kernel which fields the caller is interested in.
Packit 7cfc04
.I mask
Packit 7cfc04
is an ORed combination of the following constants:
Packit 7cfc04
.PP
Packit 7cfc04
.in +4n
Packit 7cfc04
.TS
Packit 7cfc04
lB l.
Packit 7cfc04
STATX_TYPE	Want stx_mode & S_IFMT
Packit 7cfc04
STATX_MODE	Want stx_mode & ~S_IFMT
Packit 7cfc04
STATX_NLINK	Want stx_nlink
Packit 7cfc04
STATX_UID	Want stx_uid
Packit 7cfc04
STATX_GID	Want stx_gid
Packit 7cfc04
STATX_ATIME	Want stx_atime
Packit 7cfc04
STATX_MTIME	Want stx_mtime
Packit 7cfc04
STATX_CTIME	Want stx_ctime
Packit 7cfc04
STATX_INO	Want stx_ino
Packit 7cfc04
STATX_SIZE	Want stx_size
Packit 7cfc04
STATX_BLOCKS	Want stx_blocks
Packit 7cfc04
STATX_BASIC_STATS	[All of the above]
Packit 7cfc04
STATX_BTIME	Want stx_btime
Packit 7cfc04
STATX_ALL	[All currently available fields]
Packit 7cfc04
.TE
Packit 7cfc04
.in
Packit 7cfc04
.PP
Packit 7cfc04
Note that the kernel does
Packit 7cfc04
.I not
Packit 7cfc04
reject values in
Packit 7cfc04
.I mask
Packit 7cfc04
other than the above.
Packit 7cfc04
Instead, it simply informs the caller which values are supported
Packit 7cfc04
by this kernel and filesystem via the
Packit 7cfc04
.I statx.stx_mask
Packit 7cfc04
field.
Packit 7cfc04
Therefore,
Packit 7cfc04
.I "do not"
Packit 7cfc04
simply set
Packit 7cfc04
.I mask
Packit 7cfc04
to
Packit 7cfc04
.B UINT_MAX
Packit 7cfc04
(all bits set),
Packit 7cfc04
as one or more bits may, in the future, be used to specify an
Packit 7cfc04
extension to the buffer.
Packit 7cfc04
.SS
Packit 7cfc04
The returned information
Packit 7cfc04
.PP
Packit 7cfc04
The status information for the target file is returned in the
Packit 7cfc04
.I statx
Packit 7cfc04
structure pointed to by
Packit 7cfc04
.IR statxbuf .
Packit 7cfc04
Included in this is
Packit 7cfc04
.I stx_mask
Packit 7cfc04
which indicates what other information has been returned.
Packit 7cfc04
.I stx_mask
Packit 7cfc04
has the same format as the
Packit 7cfc04
.I mask
Packit 7cfc04
argument and bits are set in it to indicate
Packit 7cfc04
which fields have been filled in.
Packit 7cfc04
.PP
Packit 7cfc04
It should be noted that the kernel may return fields that weren't
Packit 7cfc04
requested and may fail to return fields that were requested,
Packit 7cfc04
depending on what the backing filesystem supports.
Packit 7cfc04
(Fields that are given values despite being unrequested can just be ignored.)
Packit 7cfc04
In either case,
Packit 7cfc04
.I stx_mask
Packit 7cfc04
will not be equal
Packit 7cfc04
.IR mask .
Packit 7cfc04
.PP
Packit 7cfc04
If a filesystem does not support a field or if it has
Packit 7cfc04
an unrepresentable value (for instance, a file with an exotic type),
Packit 7cfc04
then the mask bit corresponding to that field will be cleared in
Packit 7cfc04
.I stx_mask
Packit 7cfc04
even if the user asked for it and a dummy value will be filled in for
Packit 7cfc04
compatibility purposes if one is available (e.g., a dummy UID and GID may be
Packit 7cfc04
specified to mount under some circumstances).
Packit 7cfc04
.PP
Packit 7cfc04
A filesystem may also fill in fields that the caller didn't ask for if it has
Packit 7cfc04
values for them available and the information is available at no extra cost.
Packit 7cfc04
If this happens, the corresponding bits will be set in
Packit 7cfc04
.IR stx_mask .
Packit 7cfc04
.PP
Packit 7cfc04
.\" Background: inode attributes are modified with i_mutex held, but
Packit 7cfc04
.\" read by stat() without taking the mutex.
Packit 7cfc04
.IR Note :
Packit 7cfc04
for performance and simplicity reasons, different fields in the
Packit 7cfc04
.I statx
Packit 7cfc04
structure may contain state information from different moments
Packit 7cfc04
during the execution of the system call.
Packit 7cfc04
For example, if
Packit 7cfc04
.IR stx_mode
Packit 7cfc04
or
Packit 7cfc04
.IR stx_uid
Packit 7cfc04
is changed by another process by calling
Packit 7cfc04
.BR chmod (2)
Packit 7cfc04
or
Packit 7cfc04
.BR chown (2),
Packit 7cfc04
.BR stat ()
Packit 7cfc04
might return the old
Packit 7cfc04
.I stx_mode
Packit 7cfc04
together with the new
Packit 7cfc04
.IR stx_uid ,
Packit 7cfc04
or the old
Packit 7cfc04
.I stx_uid
Packit 7cfc04
together with the new
Packit 7cfc04
.IR stx_mode .
Packit 7cfc04
.PP
Packit 7cfc04
Apart from
Packit 7cfc04
.I stx_mask
Packit 7cfc04
(which is described above), the fields in the
Packit 7cfc04
.I statx
Packit 7cfc04
structure are:
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_blksize
Packit 7cfc04
The "preferred" block size for efficient filesystem I/O.
Packit 7cfc04
(Writing to a file in
Packit 7cfc04
smaller chunks may cause an inefficient read-modify-rewrite.)
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_attributes
Packit 7cfc04
Further status information about the file (see below for more information).
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_nlink
Packit 7cfc04
The number of hard links on a file.
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_uid
Packit 7cfc04
This field contains the user ID of the owner of the file.
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_gid
Packit 7cfc04
This field contains the ID of the group owner of the file.
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_mode
Packit 7cfc04
The file type and mode.
Packit 7cfc04
See
Packit 7cfc04
.BR inode (7)
Packit 7cfc04
for details.
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_ino
Packit 7cfc04
The inode number of the file.
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_size
Packit 7cfc04
The size of the file (if it is a regular file or a symbolic link) in bytes.
Packit 7cfc04
The size of a symbolic link is the length of the pathname it contains,
Packit 7cfc04
without a terminating null byte.
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_blocks
Packit 7cfc04
The number of blocks allocated to the file on the medium, in 512-byte units.
Packit 7cfc04
(This may be smaller than
Packit 7cfc04
.IR stx_size /512
Packit 7cfc04
when the file has holes.)
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_attributes_mask
Packit 7cfc04
A mask indicating which bits in
Packit 7cfc04
.IR stx_attributes
Packit 7cfc04
are supported by the VFS and the filesystem.
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_atime
Packit 7cfc04
The file's last access timestamp.
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_btime
Packit 7cfc04
The file's creation timestamp.
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_ctime
Packit 7cfc04
The file's last status change timestamp.
Packit 7cfc04
.TP
Packit 7cfc04
.I stx_mtime
Packit 7cfc04
The file's last modification timestamp.
Packit 7cfc04
.TP
Packit 7cfc04
.IR stx_dev_major " and "  stx_dev_minor
Packit 7cfc04
The device on which this file (inode) resides.
Packit 7cfc04
.TP
Packit 7cfc04
.IR stx_rdev_major " and "  stx_rdev_minor
Packit 7cfc04
The device that this file (inode) represents if the file is of block or
Packit 7cfc04
character device type.
Packit 7cfc04
.PP
Packit 7cfc04
For further information on the above fields, see
Packit 7cfc04
.BR inode (7).
Packit 7cfc04
.\"
Packit 7cfc04
.SS File attributes
Packit 7cfc04
.PP
Packit 7cfc04
The
Packit 7cfc04
.I stx_attributes
Packit 7cfc04
field contains a set of ORed flags that indicate additional attributes
Packit 7cfc04
of the file.
Packit 7cfc04
Note that any attribute that is not indicated as supported by
Packit 7cfc04
.I stx_attributes_mask
Packit 7cfc04
has no usable value here.
Packit 7cfc04
The bits in
Packit 7cfc04
.I stx_attributes_mask
Packit 7cfc04
correspond bit-by-bit to
Packit 7cfc04
.IR stx_attributes .
Packit 7cfc04
.PP
Packit 7cfc04
The flags are as follows:
Packit 7cfc04
.TP
Packit 7cfc04
.B STATX_ATTR_COMPRESSED
Packit 7cfc04
The file is compressed by the filesystem and may take extra resources
Packit 7cfc04
to access.
Packit 7cfc04
.TP
Packit 7cfc04
.B STATX_ATTR_IMMUTABLE
Packit 7cfc04
The file cannot be modified: it cannot be deleted or renamed,
Packit 7cfc04
no hard links can be created to this file and no data can be written to it.
Packit 7cfc04
See
Packit 7cfc04
.BR chattr (1).
Packit 7cfc04
.TP
Packit 7cfc04
.B STATX_ATTR_APPEND
Packit 7cfc04
The file can only be opened in append mode for writing.
Packit 7cfc04
Random access writing
Packit 7cfc04
is not permitted.
Packit 7cfc04
See
Packit 7cfc04
.BR chattr (1).
Packit 7cfc04
.TP
Packit 7cfc04
.B STATX_ATTR_NODUMP
Packit 7cfc04
File is not a candidate for backup when a backup program such as
Packit 7cfc04
.BR dump (8)
Packit 7cfc04
is run.
Packit 7cfc04
See
Packit 7cfc04
.BR chattr (1).
Packit 7cfc04
.TP
Packit 7cfc04
.B STATX_ATTR_ENCRYPTED
Packit 7cfc04
A key is required for the file to be encrypted by the filesystem.
Packit 7cfc04
.SH RETURN VALUE
Packit 7cfc04
On success, zero is returned.
Packit 7cfc04
On error, \-1 is returned, and
Packit 7cfc04
.I errno
Packit 7cfc04
is set appropriately.
Packit 7cfc04
.SH ERRORS
Packit 7cfc04
.TP
Packit 7cfc04
.B EACCES
Packit 7cfc04
Search permission is denied for one of the directories
Packit 7cfc04
in the path prefix of
Packit 7cfc04
.IR pathname .
Packit 7cfc04
(See also
Packit 7cfc04
.BR path_resolution (7).)
Packit 7cfc04
.TP
Packit 7cfc04
.B EBADF
Packit 7cfc04
.I dirfd
Packit 7cfc04
is not a valid open file descriptor.
Packit 7cfc04
.TP
Packit 7cfc04
.B EFAULT
Packit 7cfc04
.I pathname
Packit 7cfc04
or
Packit 7cfc04
.I statxbuf
Packit 7cfc04
is NULL or points to a location outside the process's
Packit 7cfc04
accessible address space.
Packit 7cfc04
.TP
Packit 7cfc04
.B EINVAL
Packit 7cfc04
Invalid flag specified in
Packit 7cfc04
.IR flags .
Packit 7cfc04
.TP
Packit 7cfc04
.B EINVAL
Packit 7cfc04
Reserved flag specified in
Packit 7cfc04
.IR mask .
Packit 7cfc04
.TP
Packit 7cfc04
.B ELOOP
Packit 7cfc04
Too many symbolic links encountered while traversing the pathname.
Packit 7cfc04
.TP
Packit 7cfc04
.B ENAMETOOLONG
Packit 7cfc04
.I pathname
Packit 7cfc04
is too long.
Packit 7cfc04
.TP
Packit 7cfc04
.B ENOENT
Packit 7cfc04
A component of
Packit 7cfc04
.I pathname
Packit 7cfc04
does not exist, or
Packit 7cfc04
.I pathname
Packit 7cfc04
is an empty string and
Packit 7cfc04
.B AT_EMPTY_PATH
Packit 7cfc04
was not specified in
Packit 7cfc04
.IR flags .
Packit 7cfc04
.TP
Packit 7cfc04
.B ENOMEM
Packit 7cfc04
Out of memory (i.e., kernel memory).
Packit 7cfc04
.TP
Packit 7cfc04
.B ENOTDIR
Packit 7cfc04
A component of the path prefix of
Packit 7cfc04
.I pathname
Packit 7cfc04
is not a directory or
Packit 7cfc04
.I pathname
Packit 7cfc04
is relative and
Packit 7cfc04
.I dirfd
Packit 7cfc04
is a file descriptor referring to a file other than a directory.
Packit 7cfc04
.SH VERSIONS
Packit 7cfc04
.BR statx ()
Packit 7cfc04
was added to Linux in kernel 4.11.
Packit 7cfc04
.SH CONFORMING TO
Packit 7cfc04
.BR statx ()
Packit 7cfc04
is Linux-specific.
Packit 7cfc04
.SH NOTES
Packit 7cfc04
Glibc does not (yet) provide a wrapper for the
Packit 7cfc04
.BR statx ()
Packit 7cfc04
system call; call it using
Packit 7cfc04
.BR syscall (2).
Packit 7cfc04
.SH SEE ALSO
Packit 7cfc04
.BR ls (1),
Packit 7cfc04
.BR stat (1),
Packit 7cfc04
.BR access (2),
Packit 7cfc04
.BR chmod (2),
Packit 7cfc04
.BR chown (2),
Packit 7cfc04
.BR readlink (2),
Packit 7cfc04
.BR stat (2),
Packit 7cfc04
.BR utime (2),
Packit 7cfc04
.BR capabilities (7),
Packit 7cfc04
.BR inode (7),
Packit 7cfc04
.BR symlink (7)
Packit 7cfc04
.SH COLOPHON
Packit 7cfc04
This page is part of release 4.15 of the Linux
Packit 7cfc04
.I man-pages
Packit 7cfc04
project.
Packit 7cfc04
A description of the project,
Packit 7cfc04
information about reporting bugs,
Packit 7cfc04
and the latest version of this page,
Packit 7cfc04
can be found at
Packit 7cfc04
\%https://www.kernel.org/doc/man\-pages/.