Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/freebsd32/freebsd32_misc.c
Show First 20 Lines • Show All 465 Lines • ▼ Show 20 Lines | freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap) | ||||
int prot; | int prot; | ||||
prot = uap->prot; | prot = uap->prot; | ||||
#if defined(__amd64__) | #if defined(__amd64__) | ||||
if (i386_read_exec && (prot & PROT_READ)) | if (i386_read_exec && (prot & PROT_READ)) | ||||
prot |= PROT_EXEC; | prot |= PROT_EXEC; | ||||
#endif | #endif | ||||
return (kern_mmap(td, (uintptr_t)uap->addr, uap->len, prot, | return (kern_mmap(td, (uintptr_t)uap->addr, uap->len, prot, uap->flags, | ||||
uap->flags, uap->fd, PAIR32TO64(off_t, uap->pos))); | uap->fd, PAIR32TO64(off_t, uap->pos))); | ||||
} | } | ||||
emaste: This is just a re-wrapping? | |||||
#ifdef COMPAT_FREEBSD6 | #ifdef COMPAT_FREEBSD6 | ||||
int | int | ||||
freebsd6_freebsd32_mmap(struct thread *td, | freebsd6_freebsd32_mmap(struct thread *td, | ||||
struct freebsd6_freebsd32_mmap_args *uap) | struct freebsd6_freebsd32_mmap_args *uap) | ||||
{ | { | ||||
int prot; | int prot; | ||||
prot = uap->prot; | prot = uap->prot; | ||||
#if defined(__amd64__) | #if defined(__amd64__) | ||||
if (i386_read_exec && (prot & PROT_READ)) | if (i386_read_exec && (prot & PROT_READ)) | ||||
prot |= PROT_EXEC; | prot |= PROT_EXEC; | ||||
#endif | #endif | ||||
return (kern_mmap(td, (uintptr_t)uap->addr, uap->len, prot, | return (kern_mmap(td, (uintptr_t)uap->addr, uap->len, | ||||
uap->flags, uap->fd, PAIR32TO64(off_t, uap->pos))); | PROT_MAX(PROT_ALL) | prot, uap->flags, uap->fd, | ||||
PAIR32TO64(off_t, uap->pos))); | |||||
} | } | ||||
#endif | #endif | ||||
int | int | ||||
freebsd32_setitimer(struct thread *td, struct freebsd32_setitimer_args *uap) | freebsd32_setitimer(struct thread *td, struct freebsd32_setitimer_args *uap) | ||||
{ | { | ||||
struct itimerval itv, oitv, *itvp; | struct itimerval itv, oitv, *itvp; | ||||
struct itimerval32 i32; | struct itimerval32 i32; | ||||
▲ Show 20 Lines • Show All 2,971 Lines • Show Last 20 Lines |
This is just a re-wrapping?