From 12aa0b17328a01490c9e53904767ca59596f9ea1 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Fri, 2 Jan 2009 18:48:21 -0800 Subject: [PATCH] sparc: unify stat.h To my suprise struct stat64 was not equal on sparc 32 and sparc64, so there was really nothing to share here. Unify the files by adding their respective content to stat.h. Signed-off-by: Sam Ravnborg Signed-off-by: David S. Miller --- arch/sparc/include/asm/Kbuild | 2 -- arch/sparc/include/asm/{stat_32.h => stat.h} | 53 +++++++++++++++++++++++++--- arch/sparc/include/asm/stat_64.h | 47 ------------------------ 3 files changed, 49 insertions(+), 53 deletions(-) rename arch/sparc/include/asm/{stat_32.h => stat.h} (50%) delete mode 100644 arch/sparc/include/asm/stat_64.h diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index 57bcc1fe510..42cf48394d7 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild @@ -11,8 +11,6 @@ header-y += siginfo_32.h header-y += siginfo_64.h header-y += signal_32.h header-y += signal_64.h -header-y += stat_32.h -header-y += stat_64.h header-y += apc.h header-y += asi.h diff --git a/arch/sparc/include/asm/stat_32.h b/arch/sparc/include/asm/stat.h similarity index 50% rename from arch/sparc/include/asm/stat_32.h rename to arch/sparc/include/asm/stat.h index 45b3ee4472e..55db5eca08e 100644 --- a/arch/sparc/include/asm/stat_32.h +++ b/arch/sparc/include/asm/stat.h @@ -1,8 +1,53 @@ -#ifndef _SPARC_STAT_H -#define _SPARC_STAT_H +#ifndef __SPARC_STAT_H +#define __SPARC_STAT_H #include +#if defined(__sparc__) && defined(__arch64__) +/* 64 bit sparc */ +struct stat { + unsigned st_dev; + ino_t st_ino; + mode_t st_mode; + short st_nlink; + uid_t st_uid; + gid_t st_gid; + unsigned st_rdev; + off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; + off_t st_blksize; + off_t st_blocks; + unsigned long __unused4[2]; +}; + +struct stat64 { + unsigned long st_dev; + unsigned long st_ino; + unsigned long st_nlink; + + unsigned int st_mode; + unsigned int st_uid; + unsigned int st_gid; + unsigned int __pad0; + + unsigned long st_rdev; + long st_size; + long st_blksize; + long st_blocks; + + unsigned long st_atime; + unsigned long st_atime_nsec; + unsigned long st_mtime; + unsigned long st_mtime_nsec; + unsigned long st_ctime; + unsigned long st_ctime_nsec; + long __unused[3]; +}; + +#else +/* 32 bit sparc */ struct stat { unsigned short st_dev; ino_t st_ino; @@ -58,5 +103,5 @@ struct stat64 { unsigned int __unused4; unsigned int __unused5; }; - -#endif +#endif /* defined(__sparc__) && defined(__arch64__) */ +#endif /* __SPARC_STAT_H */ diff --git a/arch/sparc/include/asm/stat_64.h b/arch/sparc/include/asm/stat_64.h deleted file mode 100644 index 9650fdea847..00000000000 --- a/arch/sparc/include/asm/stat_64.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _SPARC64_STAT_H -#define _SPARC64_STAT_H - -#include - -struct stat { - unsigned st_dev; - ino_t st_ino; - mode_t st_mode; - short st_nlink; - uid_t st_uid; - gid_t st_gid; - unsigned st_rdev; - off_t st_size; - time_t st_atime; - time_t st_mtime; - time_t st_ctime; - off_t st_blksize; - off_t st_blocks; - unsigned long __unused4[2]; -}; - -struct stat64 { - unsigned long st_dev; - unsigned long st_ino; - unsigned long st_nlink; - - unsigned int st_mode; - unsigned int st_uid; - unsigned int st_gid; - unsigned int __pad0; - - unsigned long st_rdev; - long st_size; - long st_blksize; - long st_blocks; - - unsigned long st_atime; - unsigned long st_atime_nsec; - unsigned long st_mtime; - unsigned long st_mtime_nsec; - unsigned long st_ctime; - unsigned long st_ctime_nsec; - long __unused[3]; -}; - -#endif -- 2.11.4.GIT