Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

statx.h 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) 2017-2018 The strace developers.
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. */
  7. #ifndef STRACE_STATX_H
  8. # define STRACE_STATX_H
  9. # include <stdint.h>
  10. typedef struct {
  11. int64_t sec;
  12. int32_t nsec;
  13. int32_t reserved;
  14. } struct_statx_timestamp;
  15. typedef struct {
  16. uint32_t stx_mask; /* What results were written [uncond] */
  17. uint32_t stx_blksize; /* Preferred general I/O size [uncond] */
  18. uint64_t stx_attributes; /* Flags conveying information about the file
  19. [uncond] */
  20. uint32_t stx_nlink; /* Number of hard links */
  21. uint32_t stx_uid; /* User ID of owner */
  22. uint32_t stx_gid; /* Group ID of owner */
  23. uint16_t stx_mode; /* File mode */
  24. uint16_t reserved0[1];
  25. uint64_t stx_ino; /* Inode number */
  26. uint64_t stx_size; /* File size */
  27. uint64_t stx_blocks; /* Number of 512-byte blocks allocated */
  28. uint64_t stx_attributes_mask; /* Mask to show what's supported in
  29. stx_attributes */
  30. struct_statx_timestamp stx_atime; /* Last access time */
  31. struct_statx_timestamp stx_btime; /* File creation time */
  32. struct_statx_timestamp stx_ctime; /* Last attribute change time */
  33. struct_statx_timestamp stx_mtime; /* Last data modification time */
  34. uint32_t stx_rdev_major; /* Device ID of special file [if bdev/cdev] */
  35. uint32_t stx_rdev_minor;
  36. uint32_t stx_dev_major; /* ID of device containing file [uncond] */
  37. uint32_t stx_dev_minor;
  38. uint64_t reserved2[14]; /* Spare space for future expansion */
  39. } struct_statx;
  40. #endif /* !STRACE_STATX_H */