linux: Define STAT64_IS_KERNEL_STAT64

It indicates that the glibc export stat64 is similar in size and
layout of the kernel stat64 used on the syscall.  It is not currently
used on stat implementation, but the idea is to indicate whether
to use the kernel_stat to issue on the syscall on the *stat*64
variant (more specifically on mips which its exported ABI does not
match the kernel).

Reviewed-by: Lukasz Majewski <lukma@denx.de>
This commit is contained in:
Adhemerval Zanella 2020-07-17 23:49:50 -03:00
parent 90e1600f4f
commit 0b1c222cd0
13 changed files with 23 additions and 0 deletions

View File

@ -86,5 +86,6 @@ struct glibc21_stat
};
#define STAT_IS_KERNEL_STAT 0
#define STAT64_IS_KERNEL_STAT64 1
#define XSTAT_IS_XSTAT64 1
#define STATFS_IS_STATFS64 0

View File

@ -19,6 +19,7 @@
/* Needed to elide the itemized copy code in common xstatconv.c. */
#define STAT_IS_KERNEL_STAT 1
#define STAT64_IS_KERNEL_STAT64 1
/* Nice side-effect of 64-bit time_t switch is these are same. */
#define XSTAT_IS_XSTAT64 1

View File

@ -31,5 +31,6 @@ struct kernel_stat {
#define _HAVE_STAT64_NSEC
#define STAT_IS_KERNEL_STAT 0
#define STAT64_IS_KERNEL_STAT64 1
#define XSTAT_IS_XSTAT64 0
#define STATFS_IS_STATFS64 0

View File

@ -17,5 +17,6 @@
<https://www.gnu.org/licenses/>. */
#define STAT_IS_KERNEL_STAT 1
#define STAT64_IS_KERNEL_STAT64 1
#define XSTAT_IS_XSTAT64 1
#define STATFS_IS_STATFS64 0

View File

@ -35,5 +35,6 @@ struct kernel_stat
#define _HAVE_STAT64_NSEC
#define STAT_IS_KERNEL_STAT 0
#define STAT64_IS_KERNEL_STAT64 1
#define XSTAT_IS_XSTAT64 0
#define STATFS_IS_STATFS64 0

View File

@ -49,5 +49,6 @@ struct kernel_stat
};
#define STAT_IS_KERNEL_STAT 0
#define STAT64_IS_KERNEL_STAT64 1
#define XSTAT_IS_XSTAT64 0
#define STATFS_IS_STATFS64 0

View File

@ -1,3 +1,6 @@
#ifndef _KERNEL_STAT_H
#define _KERNEL_STAT_H
#include <sgidefs.h>
/* As tempting as it is to define XSTAT_IS_XSTAT64 for n64, the
userland data structures are not identical, because of different
@ -57,5 +60,8 @@ struct kernel_stat
#endif
#define STAT_IS_KERNEL_STAT 0
#define STAT64_IS_KERNEL_STAT64 0
#define XSTAT_IS_XSTAT64 0
#define STATFS_IS_STATFS64 0
#endif

View File

@ -48,5 +48,6 @@ struct kernel_stat
#define _HAVE_STAT64_NSEC
#define STAT_IS_KERNEL_STAT 0
#define STAT64_IS_KERNEL_STAT64 1
#define XSTAT_IS_XSTAT64 0
#define STATFS_IS_STATFS64 0

View File

@ -17,5 +17,6 @@
<https://www.gnu.org/licenses/>. */
#define STAT_IS_KERNEL_STAT 1
#define STAT64_IS_KERNEL_STAT64 1
#define XSTAT_IS_XSTAT64 1
#define STATFS_IS_STATFS64 0

View File

@ -17,5 +17,6 @@
<https://www.gnu.org/licenses/>. */
#define STAT_IS_KERNEL_STAT 1
#define STAT64_IS_KERNEL_STAT64 1
#define XSTAT_IS_XSTAT64 1
#define STATFS_IS_STATFS64 0

View File

@ -32,5 +32,6 @@ struct kernel_stat
#define _HAVE_STAT64_NSEC
#define STAT_IS_KERNEL_STAT 0
#define STAT64_IS_KERNEL_STAT64 1
#define XSTAT_IS_XSTAT64 0
#define STATFS_IS_STATFS64 0

View File

@ -1,3 +1,6 @@
#ifndef _KERNEL_STAT_H
#define _KERNEL_STAT_H
/* Definition of `struct stat' used in the kernel */
struct kernel_stat
{
@ -45,5 +48,8 @@ struct kernel_stat64
};
#define STAT_IS_KERNEL_STAT 0
#define STAT64_IS_KERNEL_STAT64 0
#define XSTAT_IS_XSTAT64 1
#define STATFS_IS_STATFS64 0
#endif /* _KERNEL_STAT_H */

View File

@ -17,5 +17,6 @@
<https://www.gnu.org/licenses/>. */
#define STAT_IS_KERNEL_STAT 1
#define STAT64_IS_KERNEL_STAT64 1
#define XSTAT_IS_XSTAT64 1
#define STATFS_IS_STATFS64 0