Link: https://git.kernel.org/torvalds/c/0ef625bba6fb Cc: Mateusz Guzik <mjguzik@xxxxxxxxx> Cc: Christian Brauner <brauner@xxxxxxxxxx> Cc: linux-fsdevel@xxxxxxxxxxxxxxx Signed-off-by: Xi Ruoyao <xry111@xxxxxxxxxxx> --- Changes from v1: - Use semantic newlines in AT_EMPTY_PATH description. - Reorder EFAULT conditions so the added parenthetical describing NULL with AT_EMPTY_PATH is next to "NULL". man/man2/statx.2 | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/man/man2/statx.2 b/man/man2/statx.2 index f7a06467d..38754d40c 100644 --- a/man/man2/statx.2 +++ b/man/man2/statx.2 @@ -20,8 +20,9 @@ Standard C library .BR "#include <fcntl.h> " "/* Definition of " AT_* " constants */" .B #include <sys/stat.h> .P -.BI "int statx(int " dirfd ", const char *restrict " pathname ", int " flags , -.BI " unsigned int " mask ", struct statx *restrict " statxbuf ); +.BI "int statx(int " dirfd ", const char *_Nullable restrict " pathname , +.BI " int " flags ", unsigned int " mask ", +.BI " struct statx *restrict " statxbuf ); .fi .SH DESCRIPTION This function returns information about a file, storing it in the buffer @@ -146,7 +147,7 @@ for an explanation of why this is useful.) By file descriptor If .I pathname -is an empty string and the +is an empty string (or NULL since Linux 6.11) and the .B AT_EMPTY_PATH flag is specified in .I flags @@ -164,7 +165,8 @@ is constructed by ORing together zero or more of the following constants: .\" commit 65cfc6722361570bfe255698d9cd4dccaf47570d If .I pathname -is an empty string, operate on the file referred to by +is an empty string (or NULL since Linux 6.11), +operate on the file referred to by .I dirfd (which may have been obtained using the .BR open (2) @@ -603,8 +605,12 @@ nor a valid file descriptor. .I pathname or .I statxbuf -is NULL or points to a location outside the process's -accessible address space. +points to a location outside the process's accessible address space or is NULL +(except since Linux 6.11 if +.B AT_EMPTY_PATH +is specified in +.IR flags , +pathname is allowed to be NULL). .TP .B EINVAL Invalid flag specified in -- 2.46.0