From 271bfee2be2ff15ab3ae997119248714985562dd Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 9 Aug 2000 21:56:45 +0000 Subject: [PATCH] More cleaning of struct stat for glibc 2.2. The necessary glibc patches will go into CVS asap. Remove st_flags and st_gen members, nothing ever used them. --- arch/mips/kernel/sysirix.c | 8 ++++---- include/asm-mips/stat.h | 11 ++++------- include/asm-mips64/stat.h | 10 ++++------ 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/arch/mips/kernel/sysirix.c b/arch/mips/kernel/sysirix.c index 817e9c1ee62..90f2f49f4a5 100644 --- a/arch/mips/kernel/sysirix.c +++ b/arch/mips/kernel/sysirix.c @@ -3,7 +3,7 @@ * * Copyright (C) 1996 David S. Miller * Copyright (C) 1997 Miguel de Icaza - * Copyright (C) 1997, 1998 Ralf Baechle + * Copyright (C) 1997, 1998, 1999, 2000 Ralf Baechle */ #include #include @@ -1249,9 +1249,9 @@ static inline void irix_xstat64_xlate(struct stat *sb) ks.st_blksize = (s32) sb->st_blksize; ks.st_blocks = (long long) sb->st_blocks; - memcpy(&ks.st_fstype[0], &sb->st_fstype[0], 16); - ks.st_pad4[0] = ks.st_pad4[1] = ks.st_pad4[2] = ks.st_pad4[3] = - ks.st_pad4[4] = ks.st_pad4[5] = ks.st_pad4[6] = ks.st_pad4[7] = 0; + memset(ks.st_fstype, 0, 16); + ks.st_pad4[0] = ks.st_pad4[1] = ks.st_pad4[2] = ks.st_pad4[3] = 0; + ks.st_pad4[4] = ks.st_pad4[5] = ks.st_pad4[6] = ks.st_pad4[7] = 0; /* Now write it all back. */ copy_to_user(sb, &ks, sizeof(struct xstat64)); diff --git a/include/asm-mips/stat.h b/include/asm-mips/stat.h index e8892d3da49..aa7722afcfc 100644 --- a/include/asm-mips/stat.h +++ b/include/asm-mips/stat.h @@ -17,8 +17,7 @@ struct __old_kernel_stat { unsigned int st_ctime, st_res3; unsigned int st_blksize; int st_blocks; - unsigned int st_flags; - unsigned int st_gen; + unsigned int st_unused0[2]; }; struct stat { @@ -46,10 +45,7 @@ struct stat { long st_blksize; long st_blocks; char st_fstype[16]; /* Filesystem type name */ - long st_pad4[8]; - /* Linux specific fields */ - unsigned int st_flags; - unsigned int st_gen; + long st_pad4[10]; }; /* @@ -67,7 +63,7 @@ struct stat64 { uid_t st_uid; gid_t st_gid; unsigned long st_rdev; - unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */ + unsigned long st_pad1[2]; /* Reserved for st_rdev expansion */ long long st_size; /* * Actually this should be timestruc_t st_atime, st_mtime and st_ctime @@ -80,6 +76,7 @@ struct stat64 { time_t st_ctime; unsigned long reserved2; /* Reserved for st_atime expansion */ unsigned long st_blksize; + unsigned long st_pad2; long long st_blocks; }; diff --git a/include/asm-mips64/stat.h b/include/asm-mips64/stat.h index e84dcb7ecd6..cef01cf2787 100644 --- a/include/asm-mips64/stat.h +++ b/include/asm-mips64/stat.h @@ -25,8 +25,7 @@ struct __old_kernel_stat { unsigned int st_ctime, st_res3; unsigned int st_blksize; int st_blocks; - unsigned int st_flags; - unsigned int st_gen; + unsigned int st_unused[2]; }; struct stat32 { @@ -50,9 +49,7 @@ struct stat32 { int st_blksize; int st_blocks; char st_fstype[16]; /* Filesystem type name */ - int st_pad4[8]; - unsigned int st_flags; - unsigned int st_gen; + int st_pad4[10]; }; /* The memory layout is the same as of struct stat64 of the 32-bit kernel. */ @@ -65,7 +62,7 @@ struct stat { uid_t st_uid; gid_t st_gid; dev_t st_rdev; - unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */ + unsigned int st_pad1[2]; /* Reserved for st_rdev expansion */ off_t st_size; /* * Actually this should be timestruc_t st_atime, st_mtime and st_ctime @@ -78,6 +75,7 @@ struct stat { time_t st_ctime; unsigned int reserved2; /* Reserved for st_atime expansion */ unsigned int st_blksize; + unsigned int st_pad2; unsigned long st_blocks; }; -- 2.11.4.GIT