* linux/32/syscallent.h [291]: Add statx entry. * linux/64/syscallent.h [291]: Likewise. * linux/arm/syscallent.h [397]: Likewise. * linux/m68k/syscallent.h [379]: Likewise. * linux/mips/syscallent-n32.h [6330]: Likewise. * linux/mips/syscallent-n64.h [5326]: Likewise. * linux/mips/syscallent-o32.h [4366]: Likewise. * linux/powerpc/syscallent.h [383]: Likewise. * linux/s390/syscallent.h [379]: Likewise. * linux/s390x/syscallent.h [379]: Likewise. * linux/xtensa/syscallent.h [351]: Likewise. * statx.h: update definition of struct_statx. * statx.c (SYS_FUNC(statx)): print stx_attributes_mask field of struct_statx. * tests/xstatx.c: update to test stx_attributes_mask. --- linux/32/syscallent.h | 1 + linux/64/syscallent.h | 1 + linux/arm/syscallent.h | 1 + linux/m68k/syscallent.h | 1 + linux/mips/syscallent-n32.h | 1 + linux/mips/syscallent-n64.h | 1 + linux/mips/syscallent-o32.h | 1 + linux/powerpc/syscallent.h | 1 + linux/s390/syscallent.h | 2 ++ linux/s390x/syscallent.h | 2 ++ linux/xtensa/syscallent.h | 2 ++ statx.c | 5 +++++ statx.h | 3 ++- tests/xstatx.c | 5 +++++ 14 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h index 530645f..67898b8 100644 --- a/linux/32/syscallent.h +++ b/linux/32/syscallent.h @@ -281,6 +281,7 @@ [288] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, [289] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, [290] = { 1, 0, SEN(pkey_free), "pkey_free" }, +[291] = { 5, TD|TF, SEN(statx), "statx" }, #undef sys_ARCH_mmap #undef ARCH_WANT_SYNC_FILE_RANGE2 diff --git a/linux/64/syscallent.h b/linux/64/syscallent.h index 9d2edec..3b3e048 100644 --- a/linux/64/syscallent.h +++ b/linux/64/syscallent.h @@ -274,3 +274,4 @@ [288] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, [289] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, [290] = { 1, 0, SEN(pkey_free), "pkey_free" }, +[291] = { 5, TD|TF, SEN(statx), "statx" }, diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h index 749e02e..459160b 100644 --- a/linux/arm/syscallent.h +++ b/linux/arm/syscallent.h @@ -421,6 +421,7 @@ [394] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, [395] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, [396] = { 1, 0, SEN(pkey_free), "pkey_free" }, +[397] = { 5, TD|TF, SEN(statx), "statx" }, #ifdef __ARM_EABI__ # define ARM_FIRST_SHUFFLED_SYSCALL 400 diff --git a/linux/m68k/syscallent.h b/linux/m68k/syscallent.h index b22f6a1..4db376b 100644 --- a/linux/m68k/syscallent.h +++ b/linux/m68k/syscallent.h @@ -404,6 +404,7 @@ [376] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [377] = { 6, TD, SEN(preadv2), "preadv2" }, [378] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[379] = { 5, TD|TF, SEN(statx), "statx" }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/mips/syscallent-n32.h b/linux/mips/syscallent-n32.h index 9a08c89..4bf3148 100644 --- a/linux/mips/syscallent-n32.h +++ b/linux/mips/syscallent-n32.h @@ -330,6 +330,7 @@ [6327] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, [6328] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, [6329] = { 1, 0, SEN(pkey_free), "pkey_free" }, +[6330] = { 5, TD|TF, SEN(statx), "statx" }, # define SYS_socket_subcall 6400 # include "subcall.h" diff --git a/linux/mips/syscallent-n64.h b/linux/mips/syscallent-n64.h index 7f8273a..5999cfa 100644 --- a/linux/mips/syscallent-n64.h +++ b/linux/mips/syscallent-n64.h @@ -326,6 +326,7 @@ [5323] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, [5324] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, [5325] = { 1, 0, SEN(pkey_free), "pkey_free" }, +[5326] = { 5, TD|TF, SEN(statx), "statx" }, # define SYS_socket_subcall 5400 # include "subcall.h" diff --git a/linux/mips/syscallent-o32.h b/linux/mips/syscallent-o32.h index 58ba621..db8ee1f 100644 --- a/linux/mips/syscallent-o32.h +++ b/linux/mips/syscallent-o32.h @@ -366,6 +366,7 @@ [4363] = { 4, TM|SI, SEN(pkey_mprotect), "pkey_mprotect" }, [4364] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, [4365] = { 1, 0, SEN(pkey_free), "pkey_free" }, +[4366] = { 5, TD|TF, SEN(statx), "statx" }, # define SYS_socket_subcall 4400 # include "subcall.h" diff --git a/linux/powerpc/syscallent.h b/linux/powerpc/syscallent.h index d8dd2f6..d6375df 100644 --- a/linux/powerpc/syscallent.h +++ b/linux/powerpc/syscallent.h @@ -409,6 +409,7 @@ [380] = { 6, TD, SEN(preadv2), "preadv2" }, [381] = { 6, TD, SEN(pwritev2), "pwritev2" }, [382] = { 5, TD, SEN(kexec_file_load), "kexec_file_load" }, +[383] = { 5, TD|TF, SEN(statx), "statx" }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/s390/syscallent.h b/linux/s390/syscallent.h index 009a700..7af4223 100644 --- a/linux/s390/syscallent.h +++ b/linux/s390/syscallent.h @@ -406,6 +406,8 @@ [375] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [376] = { 6, TD, SEN(preadv2), "preadv2" }, [377] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[378] = { }, +[379] = { 5, TD|TF, SEN(statx), "statx" }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/s390x/syscallent.h b/linux/s390x/syscallent.h index d71b093..d64ca3f 100644 --- a/linux/s390x/syscallent.h +++ b/linux/s390x/syscallent.h @@ -390,6 +390,8 @@ [375] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [376] = { 6, TD, SEN(preadv2), "preadv2" }, [377] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[378] = { }, +[379] = { 5, TD|TF, SEN(statx), "statx" }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/linux/xtensa/syscallent.h b/linux/xtensa/syscallent.h index 2215b6a..bfacb6a 100644 --- a/linux/xtensa/syscallent.h +++ b/linux/xtensa/syscallent.h @@ -336,3 +336,5 @@ [345] = { 6, TD, SEN(copy_file_range), "copy_file_range" }, [346] = { 6, TD, SEN(preadv2), "preadv2" }, [347] = { 6, TD, SEN(pwritev2), "pwritev2" }, +[348 ... 350] = { }, +[351] = { 5, TD|TF, SEN(statx), "statx" }, diff --git a/statx.c b/statx.c index 7c647fa..c53f29c 100644 --- a/statx.c +++ b/statx.c @@ -94,6 +94,11 @@ SYS_FUNC(statx) if (!abbrev(tcp)) { PRINT_FIELD_U(stx_blocks); + + tprints(", stx_attributes_mask="); + printflags(statx_attrs, stx.stx_attributes_mask, + "STATX_ATTR_???"); + PRINT_FIELD_TIME(stx_atime); PRINT_FIELD_TIME(stx_btime); PRINT_FIELD_TIME(stx_ctime); diff --git a/statx.h b/statx.h index d946291..2037287 100644 --- a/statx.h +++ b/statx.h @@ -51,7 +51,8 @@ typedef struct { uint64_t stx_ino; /* Inode number */ uint64_t stx_size; /* File size */ uint64_t stx_blocks; /* Number of 512-byte blocks allocated */ - uint64_t reserved1[1]; + uint64_t stx_attributes_mask; /* Mask to show what's supported in + stx_attributes */ struct_statx_timestamp stx_atime; /* Last access time */ struct_statx_timestamp stx_btime; /* File creation time */ diff --git a/tests/xstatx.c b/tests/xstatx.c index 774aae0..f4e1a90 100644 --- a/tests/xstatx.c +++ b/tests/xstatx.c @@ -224,6 +224,10 @@ print_stat(const STRUCT_STAT *st) PRINT_FIELD_U(stx_ino); PRINT_FIELD_U(stx_size); PRINT_FIELD_U(stx_blocks); + + printf(", stx_attributes_mask="); + printflags(statx_attrs, st->stx_attributes_mask, "STATX_ATTR_???"); + PRINT_FIELD_TIME(stx_atime); PRINT_FIELD_TIME(stx_btime); PRINT_FIELD_TIME(stx_ctime); @@ -338,6 +342,7 @@ main(void) LOG_STAT_OFFSETOF_SIZEOF(*st, stx_ino); LOG_STAT_OFFSETOF_SIZEOF(*st, stx_size); LOG_STAT_OFFSETOF_SIZEOF(*st, stx_blocks); + LOG_STAT_OFFSETOF_SIZEOF(*st, stx_attributes_mask); LOG_STAT_OFFSETOF_SIZEOF(*st, stx_atime); LOG_STAT_OFFSETOF_SIZEOF(*st, stx_btime); LOG_STAT_OFFSETOF_SIZEOF(*st, stx_ctime); -- 2.10.2 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel