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:
parent
230185769a
commit
66a791667c
@ -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));
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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__ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user