diff options
author | 2003-04-28 21:32:08 +0000 | |
---|---|---|
committer | 2003-04-28 21:32:08 +0000 | |
commit | bbec6e82d3acbf56e42b0a0a6c01012acf8327aa (patch) | |
tree | 9c93e1e647ebcec6759e6763df8bbf1b79a7717a /lib/libc | |
parent | strncpy IS NOT strlcpy (diff) | |
download | wireguard-openbsd-bbec6e82d3acbf56e42b0a0a6c01012acf8327aa.tar.xz wireguard-openbsd-bbec6e82d3acbf56e42b0a0a6c01012acf8327aa.zip |
Change mquery() function call signature to be the same a mmap(). It
needs the prot/flags info and passing the addresses via arg/return allows
it to be traced via ktrace better than an in/out paramter.
This adds a new mquery syscall and renames the old one to omquery.
New kernel _MUST_ be built, booted, and 'make includes' before building
ld.so with this change.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/sys/mquery.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/sys/mquery.c b/lib/libc/sys/mquery.c index c58d466ca20..f5277d49fe1 100644 --- a/lib/libc/sys/mquery.c +++ b/lib/libc/sys/mquery.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mquery.c,v 1.3 2003/04/25 20:32:07 drahn Exp $ */ +/* $OpenBSD: mquery.c,v 1.4 2003/04/28 21:32:08 drahn Exp $ */ /* * Written by Artur Grabowski <art@openbsd.org> Public Domain */ @@ -10,8 +10,9 @@ /* * This function provides 64-bit offset padding. */ -int -mquery(int flags, void **addr, size_t size, int fd, off_t off) +void * +mquery(void *addr, size_t len, int prot, int flags, int fd, off_t offset) { - return(__syscall((quad_t)SYS_mquery, flags, addr, size, fd, off)); + return((void *)(long)__syscall((quad_t)SYS_mquery, addr, len, prot, + flags, fd, 0, offset)); } |