stat.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef _ASM_POWERPC_STAT_H
  2. #define _ASM_POWERPC_STAT_H
  3. /*
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation; either version
  7. * 2 of the License, or (at your option) any later version.
  8. */
  9. #include <linux/types.h>
  10. #define STAT_HAVE_NSEC 1
  11. #ifndef __powerpc64__
  12. struct __old_kernel_stat {
  13. unsigned short st_dev;
  14. unsigned short st_ino;
  15. unsigned short st_mode;
  16. unsigned short st_nlink;
  17. unsigned short st_uid;
  18. unsigned short st_gid;
  19. unsigned short st_rdev;
  20. unsigned long st_size;
  21. unsigned long st_atime;
  22. unsigned long st_mtime;
  23. unsigned long st_ctime;
  24. };
  25. #endif /* !__powerpc64__ */
  26. struct stat {
  27. unsigned long st_dev;
  28. ino_t st_ino;
  29. #ifdef __powerpc64__
  30. nlink_t st_nlink;
  31. mode_t st_mode;
  32. #else
  33. mode_t st_mode;
  34. nlink_t st_nlink;
  35. #endif
  36. uid_t st_uid;
  37. gid_t st_gid;
  38. unsigned long st_rdev;
  39. off_t st_size;
  40. unsigned long st_blksize;
  41. unsigned long st_blocks;
  42. unsigned long st_atime;
  43. unsigned long st_atime_nsec;
  44. unsigned long st_mtime;
  45. unsigned long st_mtime_nsec;
  46. unsigned long st_ctime;
  47. unsigned long st_ctime_nsec;
  48. unsigned long __unused4;
  49. unsigned long __unused5;
  50. #ifdef __powerpc64__
  51. unsigned long __unused6;
  52. #endif
  53. };
  54. /* This matches struct stat64 in glibc2.1. Only used for 32 bit. */
  55. struct stat64 {
  56. unsigned long long st_dev; /* Device. */
  57. unsigned long long st_ino; /* File serial number. */
  58. unsigned int st_mode; /* File mode. */
  59. unsigned int st_nlink; /* Link count. */
  60. unsigned int st_uid; /* User ID of the file's owner. */
  61. unsigned int st_gid; /* Group ID of the file's group. */
  62. unsigned long long st_rdev; /* Device number, if device. */
  63. unsigned short __pad2;
  64. long long st_size; /* Size of file, in bytes. */
  65. int st_blksize; /* Optimal block size for I/O. */
  66. long long st_blocks; /* Number 512-byte blocks allocated. */
  67. int st_atime; /* Time of last access. */
  68. unsigned int st_atime_nsec;
  69. int st_mtime; /* Time of last modification. */
  70. unsigned int st_mtime_nsec;
  71. int st_ctime; /* Time of last status change. */
  72. unsigned int st_ctime_nsec;
  73. unsigned int __unused4;
  74. unsigned int __unused5;
  75. };
  76. #endif /* _ASM_POWERPC_STAT_H */