diff --git a/lib/libsysdecode/flags.c b/lib/libsysdecode/flags.c index 957b4a95e666..5ba197438452 100644 --- a/lib/libsysdecode/flags.c +++ b/lib/libsysdecode/flags.c @@ -1277,3 +1277,10 @@ sysdecode_sctp_sinfo_flags(FILE *fp, int sinfo_flags) } } } + +bool +sysdecode_shmflags(FILE *fp, int flags, int *rem) +{ + + return (print_mask_0(fp, shmflags, flags, rem)); +} diff --git a/lib/libsysdecode/mktables b/lib/libsysdecode/mktables index 4765ca5d8beb..c85cd8657230 100644 --- a/lib/libsysdecode/mktables +++ b/lib/libsysdecode/mktables @@ -165,6 +165,7 @@ if [ -e "${include_dir}/x86/sysarch.h" ]; then else gen_table "sysarchnum" "[A-Z_]+[[:space:]]+[0-9]+" "machine/sysarch.h" fi +gen_table "shmflags" "SHM_[A-Z_]+[[:space:]]+0x[0-9]+" "sys/mman.h" "SHM_ANON" # Generate a .depend file for our output file if [ -n "$output_file" ]; then diff --git a/lib/libsysdecode/sysdecode.h b/lib/libsysdecode/sysdecode.h index 218943245b66..a01ac1243aa2 100644 --- a/lib/libsysdecode/sysdecode.h +++ b/lib/libsysdecode/sysdecode.h @@ -128,5 +128,6 @@ const char *sysdecode_vmresult(int _result); bool sysdecode_wait4_options(FILE *_fp, int _options, int *_rem); bool sysdecode_wait6_options(FILE *_fp, int _options, int *_rem); const char *sysdecode_whence(int _whence); +bool sysdecode_shmflags(FILE *_fp, int _flags, int *_rem); #endif /* !__SYSDECODE_H__ */