Author: kevans Date: Wed Feb 19 14:52:32 2020 New Revision: 358115 URL: https://svnweb.freebsd.org/changeset/base/358115
Log: libsysdecode: grab shmflags from sys/mman.h, add decode method Any SHM_* flag here is (and likely will continue to be) a shmflag that may be passed to shm_open2(), with exception to SHM_ANON. This is a prereq to adding appropriate support to truss/kdump. Reviewed by: kaktus (slightly earlier version) Differential Revision: https://reviews.freebsd.org/D23733 Modified: head/lib/libsysdecode/flags.c head/lib/libsysdecode/mktables head/lib/libsysdecode/sysdecode.h Modified: head/lib/libsysdecode/flags.c ============================================================================== --- head/lib/libsysdecode/flags.c Wed Feb 19 14:51:39 2020 (r358114) +++ head/lib/libsysdecode/flags.c Wed Feb 19 14:52:32 2020 (r358115) @@ -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)); +} Modified: head/lib/libsysdecode/mktables ============================================================================== --- head/lib/libsysdecode/mktables Wed Feb 19 14:51:39 2020 (r358114) +++ head/lib/libsysdecode/mktables Wed Feb 19 14:52:32 2020 (r358115) @@ -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 Modified: head/lib/libsysdecode/sysdecode.h ============================================================================== --- head/lib/libsysdecode/sysdecode.h Wed Feb 19 14:51:39 2020 (r358114) +++ head/lib/libsysdecode/sysdecode.h Wed Feb 19 14:52:32 2020 (r358115) @@ -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__ */ _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
