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