]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_io: statx -r should print attributes_mask
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 28 Mar 2019 23:05:01 +0000 (18:05 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 28 Mar 2019 23:05:01 +0000 (18:05 -0500)
We're dumping the raw structure, so we ought to dump everything,
including the attributes_mask field.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
io/stat.c
io/statx.h

index 64662b43480979d472bb4b1b72675e492c6cfc91..517be66ed52b471f80c299c821b308eff12ae81a 100644 (file)
--- a/io/stat.c
+++ b/io/stat.c
@@ -6,6 +6,9 @@
  * Portions of statx support written by David Howells (dhowells@redhat.com)
  */
 
+/* Try to pick up statx definitions from the system headers. */
+#include <linux/stat.h>
+
 #include "command.h"
 #include "input.h"
 #include "init.h"
@@ -272,6 +275,7 @@ dump_raw_statx(struct statx *stx)
        printf("stat.ino = %llu\n", (unsigned long long)stx->stx_ino);
        printf("stat.size = %llu\n", (unsigned long long)stx->stx_size);
        printf("stat.blocks = %llu\n", (unsigned long long)stx->stx_blocks);
+       printf("stat.attributes_mask = 0x%llx\n", (unsigned long long)stx->stx_attributes_mask);
        printf("stat.atime.tv_sec = %lld\n", (long long)stx->stx_atime.tv_sec);
        printf("stat.atime.tv_nsec = %d\n", stx->stx_atime.tv_nsec);
        printf("stat.btime.tv_sec = %lld\n", (long long)stx->stx_btime.tv_sec);
index 4e4b31eebda094d6f0023df892f5185a1b419122..4f40eaa16d68e9bb691a94cd3f1b22ece319dcf7 100644 (file)
@@ -107,7 +107,7 @@ struct statx {
        __u64   stx_ino;        /* Inode number */
        __u64   stx_size;       /* File size */
        __u64   stx_blocks;     /* Number of 512-byte blocks allocated */
-       __u64   __spare1[1];
+       __u64   stx_attributes_mask; /* Mask to show what's supported in stx_attributes */
        /* 0x40 */
        struct statx_timestamp  stx_atime;      /* Last access time */
        struct statx_timestamp  stx_btime;      /* File creation time */