[xtensa-cvscommit] linux/include/asm-xtensa stat.h,1.1.1.1,1.2
Brought to you by:
zankel
|
From: <joe...@us...> - 2002-09-09 19:24:14
|
Update of /cvsroot/xtensa/linux/include/asm-xtensa
In directory usw-pr-cvs1:/tmp/cvs-serv2235/include/asm-xtensa
Modified Files:
stat.h
Log Message:
Corrected 'struct stat64' for bi-endian Xtensa. It had a few errors for big-endian processors. I wonder if this will fix any other bugs on our list?? Be sure to reproduce them before debugging them.
Index: stat.h
===================================================================
RCS file: /cvsroot/xtensa/linux/include/asm-xtensa/stat.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** stat.h 28 Aug 2002 16:11:31 -0000 1.1.1.1
--- stat.h 9 Sep 2002 19:24:06 -0000 1.2
***************
*** 51,91 ****
};
! /* This matches struct stat64 in glibc2.1, hence the absolutely
! * insane amounts of padding around dev_t's.
*/
! struct stat64 {
! unsigned short st_dev;
unsigned char __pad0[10];
! unsigned long st_ino;
! unsigned int st_mode;
! unsigned int st_nlink;
! unsigned long st_uid;
! unsigned long st_gid;
! unsigned short st_rdev;
unsigned char __pad3[10];
! long long st_size;
! unsigned long st_blksize;
!
! /* glibc st_blocks are long long; pad for alignment */
! unsigned long __pad4;
!
! unsigned long st_blocks; /* Number 512-byte blocks allocated. */
! unsigned long __pad5; /* future possible st_blocks high bits */
!
! unsigned long st_atime;
! unsigned long __pad6;
!
! unsigned long st_mtime;
! unsigned long __pad7;
! unsigned long st_ctime;
! unsigned long __pad8; /* will be high 32 bits of ctime someday */
! unsigned long __unused1;
! unsigned long __unused2;
};
--- 51,102 ----
};
! /* This matches struct stat64 in glibc-2.2.3
*/
! struct stat64 {
! #ifdef __XTENSA_EL__
! unsigned short st_dev; /* Device */
unsigned char __pad0[10];
+ #else
+ unsigned char __pad0[6];
+ unsigned short st_dev;
+ unsigned char __pad1[2];
+ #endif
! #define STAT64_HAS_BROKEN_ST_INO 1
! unsigned long __st_ino; /* 32bit file serial number. */
! unsigned int st_mode; /* File mode. */
! unsigned int st_nlink; /* Link count. */
! unsigned int st_uid; /* User ID of the file's owner. */
! unsigned int st_gid; /* Group ID of the file's group. */
! #ifdef __XTENSA_EL__
! unsigned short st_rdev; /* Device number, if device. */
unsigned char __pad3[10];
+ #else
+ unsigned char __pad2[6];
+ unsigned short st_rdev;
+ unsigned char __pad3[2];
+ #endif
! long long int st_size; /* Size of file, in bytes. */
! long int st_blksize; /* Optimal block size for I/O. */
! #ifdef __XTENSA_EL__
! unsigned long st_blocks; /* Number 512-byte blocks allocated. */
! unsigned long __pad4;
! #else
! unsigned long __pad4;
! unsigned long st_blocks;
! #endif
! unsigned long __pad5;
! long int st_atime; /* Time of last access. */
! unsigned long __pad6;
! long int st_mtime; /* Time of last modification. */
! unsigned long __pad7;
! long int st_ctime; /* Time of last status change. */
! unsigned long __pad8;
! unsigned long long int st_ino; /* File serial number. */
};
|