| 30 | } |
| 31 | |
| 32 | static inline void |
| 33 | statx_to_stat (struct statx *stx, struct stat *stat) |
| 34 | { |
| 35 | stat->st_dev = makedev (stx->stx_dev_major, stx->stx_dev_minor); |
| 36 | stat->st_ino = stx->stx_ino; |
| 37 | stat->st_mode = stx->stx_mode; |
| 38 | stat->st_nlink = stx->stx_nlink; |
| 39 | stat->st_uid = stx->stx_uid; |
| 40 | stat->st_gid = stx->stx_gid; |
| 41 | stat->st_rdev = makedev (stx->stx_rdev_major, stx->stx_rdev_minor); |
| 42 | stat->st_size = stx->stx_size; |
| 43 | stat->st_blksize = stx->stx_blksize; |
| 44 | /* define to avoid sc_prohibit_stat_st_blocks. */ |
| 45 | # define SC_ST_BLOCKS st_blocks |
| 46 | stat->SC_ST_BLOCKS = stx->stx_blocks; |
| 47 | stat->st_atim = statx_timestamp_to_timespec (stx->stx_atime); |
| 48 | stat->st_mtim = statx_timestamp_to_timespec (stx->stx_mtime); |
| 49 | stat->st_ctim = statx_timestamp_to_timespec (stx->stx_ctime); |
| 50 | } |
| 51 | # endif /* HAVE_STATX && defined STATX_INO */ |
| 52 | #endif /* COREUTILS_STATX_H */ |
no test coverage detected