stat.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef _PPC_STAT_H
  2. #define _PPC_STAT_H
  3. #ifdef __KERNEL__
  4. #include <linux/types.h>
  5. #endif /* __KERNEL__ */
  6. struct __old_kernel_stat {
  7. unsigned short st_dev;
  8. unsigned short st_ino;
  9. unsigned short st_mode;
  10. unsigned short st_nlink;
  11. unsigned short st_uid;
  12. unsigned short st_gid;
  13. unsigned short st_rdev;
  14. unsigned long st_size;
  15. unsigned long st_atime;
  16. unsigned long st_mtime;
  17. unsigned long st_ctime;
  18. };
  19. #define STAT_HAVE_NSEC 1
  20. struct stat {
  21. unsigned st_dev;
  22. ino_t st_ino;
  23. mode_t st_mode;
  24. nlink_t st_nlink;
  25. uid_t st_uid;
  26. gid_t st_gid;
  27. unsigned st_rdev;
  28. off_t st_size;
  29. unsigned long st_blksize;
  30. unsigned long st_blocks;
  31. unsigned long st_atime;
  32. unsigned long st_atime_nsec;
  33. unsigned long st_mtime;
  34. unsigned long st_mtime_nsec;
  35. unsigned long st_ctime;
  36. unsigned long st_ctime_nsec;
  37. unsigned long __unused4;
  38. unsigned long __unused5;
  39. };
  40. /* This matches struct stat64 in glibc2.1.
  41. */
  42. struct stat64 {
  43. unsigned long long st_dev; /* Device. */
  44. unsigned long long st_ino; /* File serial number. */
  45. unsigned int st_mode; /* File mode. */
  46. unsigned int st_nlink; /* Link count. */
  47. unsigned int st_uid; /* User ID of the file's owner. */
  48. unsigned int st_gid; /* Group ID of the file's group. */
  49. unsigned long long st_rdev; /* Device number, if device. */
  50. unsigned short int __pad2;
  51. long long st_size; /* Size of file, in bytes. */
  52. long st_blksize; /* Optimal block size for I/O. */
  53. long long st_blocks; /* Number 512-byte blocks allocated. */
  54. long st_atime; /* Time of last access. */
  55. unsigned long st_atime_nsec;
  56. long st_mtime; /* Time of last modification. */
  57. unsigned long int st_mtime_nsec;
  58. long st_ctime; /* Time of last status change. */
  59. unsigned long int st_ctime_nsec;
  60. unsigned long int __unused4;
  61. unsigned long int __unused5;
  62. };
  63. #endif