From 1e8cdc2e593c4e9ec7f4bdac2fbf48a4ad29f5b8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 16 Nov 2014 12:30:52 +0000 Subject: Replace a plethora of historical protection options with just PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis --- sys/compat/linux/linux_misc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/compat/linux/linux_misc.c') diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index bf37e3d101f..357d8de61e7 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_misc.c,v 1.91 2014/09/08 01:47:06 guenther Exp $ */ +/* $OpenBSD: linux_misc.c,v 1.92 2014/11/16 12:30:59 deraadt Exp $ */ /* $NetBSD: linux_misc.c,v 1.27 1996/05/20 01:59:21 fvdl Exp $ */ /*- @@ -810,8 +810,8 @@ linux_to_bsd_mmap_args(cma, uap) SCARG(cma, addr) = (void *)SCARG(uap, addr); SCARG(cma, len) = SCARG(uap, len); SCARG(cma, prot) = SCARG(uap, prot); - if (SCARG(cma, prot) & VM_PROT_WRITE) /* XXX */ - SCARG(cma, prot) |= VM_PROT_READ; + if (SCARG(cma, prot) & PROT_WRITE) /* XXX */ + SCARG(cma, prot) |= PROT_READ; SCARG(cma, flags) = flags; SCARG(cma, fd) = flags & MAP_ANON ? -1 : SCARG(uap, fd); SCARG(cma, pad) = 0; -- cgit v1.2.3-59-g8ed1b