1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00

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
This commit is contained in:
Kyle Evans 2020-02-19 14:52:32 +00:00
parent 09d7d4ad9a
commit c70019dd0a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=358115
3 changed files with 9 additions and 0 deletions

View File

@ -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));
}

View File

@ -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

View File

@ -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__ */