From: Eugene Syromyatnikov Date: Sun, 15 Apr 2018 22:59:56 +0000 (+0200) Subject: xlat: add SHM_STAT_ANY X-Git-Tag: v4.23~170 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe6e9eaa9910d7f251d9d28f6500c203e86bdfb1;p=strace xlat: add SHM_STAT_ANY * xlat/shmctl_flags.in (SHM_STAT_ANY): New constant, introduced by Linux commit v4.17-rc1~52^2~23. * tests/ipc_shm.c: Check it. Co-Authored-by: Dmitry V. Levin --- diff --git a/tests/ipc_shm.c b/tests/ipc_shm.c index 0d077d55..f5802cc2 100644 --- a/tests/ipc_shm.c +++ b/tests/ipc_shm.c @@ -41,6 +41,10 @@ # define SHM_HUGE_MASK 0x3f #endif +#ifndef SHM_STAT_ANY +# define SHM_STAT_ANY 15 +#endif + #include "xlat.h" #include "xlat/shm_resource_flags.h" @@ -53,6 +57,7 @@ # define str_ipc_stat "0x2" # define str_shm_stat "0xd" # define str_shm_info "0xe" +# define str_shm_stat_any "0xf" # define str_ipc_64 "0x100" # define str_bogus_cmd "0xdefaced2" #elif XLAT_VERBOSE @@ -66,6 +71,7 @@ # define str_ipc_stat "0x2 /\\* IPC_STAT \\*/" # define str_shm_stat "0xd /\\* SHM_STAT \\*/" # define str_shm_info "0xe /\\* SHM_INFO \\*/" +# define str_shm_stat_any "0xf /\\* SHM_STAT_ANY \\*/" # define str_ipc_64 "0x100 /\\* IPC_64 \\*/" # define str_bogus_cmd "0xdefaced2 /\\* SHM_\\?\\?\\? \\*/" #else @@ -78,6 +84,7 @@ # define str_ipc_stat "IPC_STAT" # define str_shm_stat "SHM_STAT" # define str_shm_info "SHM_INFO" +# define str_shm_stat_any "SHM_STAT_ANY" # define str_ipc_64 "IPC_64" # define str_bogus_cmd "0xdefaced2 /\\* SHM_\\?\\?\\? \\*/" #endif @@ -205,5 +212,9 @@ main(void) printf("shmctl\\(%d, (%s\\|)?%s, %p\\) = %s\n", id, str_ipc_64, str_shm_stat, &ds, sprintrc_grep(rc)); + rc = shmctl(id, SHM_STAT_ANY, &ds); + printf("shmctl\\(%d, (%s\\|)?%s, %p\\) = %s\n", + id, str_ipc_64, str_shm_stat_any, &ds, sprintrc_grep(rc)); + return 0; } diff --git a/xlat/shmctl_flags.in b/xlat/shmctl_flags.in index f22e793d..55c5c5c2 100644 --- a/xlat/shmctl_flags.in +++ b/xlat/shmctl_flags.in @@ -6,3 +6,4 @@ SHM_LOCK SHM_UNLOCK SHM_STAT SHM_INFO +SHM_STAT_ANY 15