mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
io: statx, fstatat: Drop nonnull attribute on the path argument
Since Linux 6.11 the kernel allows path to be NULL if flags & AT_EMPTY_PATH. Let's allow users to take the advantage if they don't care running on old kernels. Signed-off-by: Miao Wang <shankerwangmiao@gmail.com> Signed-off-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Florian Weimer <fweimer@redhat.com>
This commit is contained in:
parent
15ab68bf1a
commit
55618e1396
2 changed files with 6 additions and 6 deletions
|
@ -64,6 +64,6 @@ __BEGIN_DECLS
|
||||||
/* Fill *BUF with information about PATH in DIRFD. */
|
/* Fill *BUF with information about PATH in DIRFD. */
|
||||||
int statx (int __dirfd, const char *__restrict __path, int __flags,
|
int statx (int __dirfd, const char *__restrict __path, int __flags,
|
||||||
unsigned int __mask, struct statx *__restrict __buf)
|
unsigned int __mask, struct statx *__restrict __buf)
|
||||||
__THROW __nonnull ((2, 5));
|
__THROW __nonnull ((5));
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
|
@ -263,14 +263,14 @@ extern int __REDIRECT_NTH (fstat64, (int __fd, struct stat64 *__buf),
|
||||||
# ifndef __USE_FILE_OFFSET64
|
# ifndef __USE_FILE_OFFSET64
|
||||||
extern int fstatat (int __fd, const char *__restrict __file,
|
extern int fstatat (int __fd, const char *__restrict __file,
|
||||||
struct stat *__restrict __buf, int __flag)
|
struct stat *__restrict __buf, int __flag)
|
||||||
__THROW __nonnull ((2, 3));
|
__THROW __nonnull ((3));
|
||||||
# else
|
# else
|
||||||
# ifdef __USE_TIME64_REDIRECTS
|
# ifdef __USE_TIME64_REDIRECTS
|
||||||
# ifdef __REDIRECT_NTH
|
# ifdef __REDIRECT_NTH
|
||||||
extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
|
extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
|
||||||
struct stat *__restrict __buf,
|
struct stat *__restrict __buf,
|
||||||
int __flag),
|
int __flag),
|
||||||
__fstatat64_time64) __nonnull ((2, 3));
|
__fstatat64_time64) __nonnull ((3));
|
||||||
# else
|
# else
|
||||||
# define fstatat __fstatat64_time64
|
# define fstatat __fstatat64_time64
|
||||||
# endif
|
# endif
|
||||||
|
@ -279,7 +279,7 @@ extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
|
||||||
extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
|
extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
|
||||||
struct stat *__restrict __buf,
|
struct stat *__restrict __buf,
|
||||||
int __flag),
|
int __flag),
|
||||||
fstatat64) __nonnull ((2, 3));
|
fstatat64) __nonnull ((3));
|
||||||
# else
|
# else
|
||||||
# define fstatat fstatat64
|
# define fstatat fstatat64
|
||||||
# endif
|
# endif
|
||||||
|
@ -290,7 +290,7 @@ extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file,
|
||||||
# ifndef __USE_TIME64_REDIRECTS
|
# ifndef __USE_TIME64_REDIRECTS
|
||||||
extern int fstatat64 (int __fd, const char *__restrict __file,
|
extern int fstatat64 (int __fd, const char *__restrict __file,
|
||||||
struct stat64 *__restrict __buf, int __flag)
|
struct stat64 *__restrict __buf, int __flag)
|
||||||
__THROW __nonnull ((2, 3));
|
__THROW __nonnull ((3));
|
||||||
# else
|
# else
|
||||||
# ifdef __REDIRECT_NTH
|
# ifdef __REDIRECT_NTH
|
||||||
extern int __REDIRECT_NTH (fstatat64, (int __fd,
|
extern int __REDIRECT_NTH (fstatat64, (int __fd,
|
||||||
|
@ -298,7 +298,7 @@ extern int __REDIRECT_NTH (fstatat64, (int __fd,
|
||||||
struct stat64 *__restrict __buf,
|
struct stat64 *__restrict __buf,
|
||||||
int __flag),
|
int __flag),
|
||||||
__fstatat64_time64)
|
__fstatat64_time64)
|
||||||
__nonnull ((2, 3));
|
__nonnull ((3));
|
||||||
# else
|
# else
|
||||||
# define fstatat64 __fstatat64_time64
|
# define fstatat64 __fstatat64_time64
|
||||||
# endif
|
# endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue