Message ID | 20240827102518.43332-2-xry111@xry111.site (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] statx.2: Document AT_EMPTY_PATH allows using NULL instead of "" for pathname | expand |
Hi Xi, On Tue, Aug 27, 2024 at 06:25:19PM GMT, Xi Ruoyao wrote: > Link: https://git.kernel.org/torvalds/c/0ef625bba6fb > Cc: Mateusz Guzik <mjguzik@gmail.com> > Cc: Christian Brauner <brauner@kernel.org> > Cc: linux-fsdevel@vger.kernel.org > Signed-off-by: Xi Ruoyao <xry111@xry111.site> > --- > > 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". Thanks! Patch applied. Have a lovely day! Alex > > 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 >
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
Link: https://git.kernel.org/torvalds/c/0ef625bba6fb Cc: Mateusz Guzik <mjguzik@gmail.com> Cc: Christian Brauner <brauner@kernel.org> Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Xi Ruoyao <xry111@xry111.site> --- 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(-)