Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b70fedc1 authored by H.J. Lu's avatar H.J. Lu Committed by H. Peter Anvin
Browse files

x86, x32: Use __kernel_long_t/__kernel_ulong_t in x86-64 stat.h



Both x32 and x86-64 use the same stat system call interface.  But x32
long is 32-bit.  This patch changes x86 uapi <asm/stat.h> to use
 __kernel_long_t/__kernel_ulong_t in x86-64 stat.

Signed-off-by: default avatarH.J. Lu <hjl.tools@gmail.com>
Link: http://lkml.kernel.org/r/CAMe9rOquPtWEro0GQ=Z95pZJ=c7GGkSHynjN4FbiB4p445x-Ng@mail.gmail.com


Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent 319e2e3f
Loading
Loading
Loading
Loading
+22 −20
Original line number Original line Diff line number Diff line
#ifndef _ASM_X86_STAT_H
#ifndef _ASM_X86_STAT_H
#define _ASM_X86_STAT_H
#define _ASM_X86_STAT_H


#include <asm/posix_types.h>

#define STAT_HAVE_NSEC 1
#define STAT_HAVE_NSEC 1


#ifdef __i386__
#ifdef __i386__
@@ -78,26 +80,26 @@ struct stat64 {
#else /* __i386__ */
#else /* __i386__ */


struct stat {
struct stat {
	unsigned long	st_dev;
	__kernel_ulong_t	st_dev;
	unsigned long	st_ino;
	__kernel_ulong_t	st_ino;
	unsigned long	st_nlink;
	__kernel_ulong_t	st_nlink;


	unsigned int		st_mode;
	unsigned int		st_mode;
	unsigned int		st_uid;
	unsigned int		st_uid;
	unsigned int		st_gid;
	unsigned int		st_gid;
	unsigned int		__pad0;
	unsigned int		__pad0;
	unsigned long	st_rdev;
	__kernel_ulong_t	st_rdev;
	long		st_size;
	__kernel_long_t		st_size;
	long		st_blksize;
	__kernel_long_t		st_blksize;
	long		st_blocks;	/* Number 512-byte blocks allocated. */
	__kernel_long_t		st_blocks;	/* Number 512-byte blocks allocated. */


	unsigned long	st_atime;
	__kernel_ulong_t	st_atime;
	unsigned long	st_atime_nsec;
	__kernel_ulong_t	st_atime_nsec;
	unsigned long	st_mtime;
	__kernel_ulong_t	st_mtime;
	unsigned long	st_mtime_nsec;
	__kernel_ulong_t	st_mtime_nsec;
	unsigned long	st_ctime;
	__kernel_ulong_t	st_ctime;
	unsigned long   st_ctime_nsec;
	__kernel_ulong_t	st_ctime_nsec;
	long		__unused[3];
	__kernel_long_t		__unused[3];
};
};


/* We don't need to memset the whole thing just to initialize the padding */
/* We don't need to memset the whole thing just to initialize the padding */