aboutsummaryrefslogtreecommitdiff
path: root/lib/libsysdecode/flags.c
diff options
context:
space:
mode:
authorPawel Biernacki <kaktus@FreeBSD.org>2019-09-30 19:03:43 +0000
committerPawel Biernacki <kaktus@FreeBSD.org>2019-09-30 19:03:43 +0000
commitc1dd36cfca5c95289bd2ea68ed10d5652fc92c57 (patch)
treeda315074b10d28d5370c74a7a4a4824c30ef21ee /lib/libsysdecode/flags.c
parent052ad61b7eb9bd5fdbe720f2edf7ecb1ca35d381 (diff)
Notes
Diffstat (limited to 'lib/libsysdecode/flags.c')
-rw-r--r--lib/libsysdecode/flags.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libsysdecode/flags.c b/lib/libsysdecode/flags.c
index ae2b5ff057e1..957b4a95e666 100644
--- a/lib/libsysdecode/flags.c
+++ b/lib/libsysdecode/flags.c
@@ -657,8 +657,18 @@ sysdecode_mlockall_flags(FILE *fp, int flags, int *rem)
bool
sysdecode_mmap_prot(FILE *fp, int prot, int *rem)
{
+ int protm;
+ bool printed;
- return (print_mask_int(fp, mmapprot, prot, rem));
+ printed = false;
+ protm = PROT_MAX_EXTRACT(prot);
+ if (protm != 0) {
+ fputs("PROT_MAX(", fp);
+ printed = print_mask_int(fp, mmapprot, protm, rem);
+ fputs(")|", fp);
+ prot = protm;
+ }
+ return (print_mask_int(fp, mmapprot, prot, rem) || printed);
}
bool