Update statx parser and syscall entries lists to the upstream
* 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 (struct_statx): Update. * statx.c (SYS_FUNC(statx)): Print struct_statx.stx_attributes_mask. * tests/xstatx.c (print_stat, main): Update to test decoding of struct_statx.stx_attributes_mask.
This commit is contained in:
parent
87607b9afc
commit
f67d2ba565
@ -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
|
||||
|
@ -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" },
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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" },
|
||||
|
5
statx.c
5
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);
|
||||
|
3
statx.h
3
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 */
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user