summaryrefslogtreecommitdiffstats
path: root/lib/libc/sys
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2003-04-25 18:30:18 +0000
committerdrahn <drahn@openbsd.org>2003-04-25 18:30:18 +0000
commit55185975ed6b5ee0e44067173fd6600463357e6e (patch)
tree3631016c9381b7b4a421af16efd29da8fe8fdad2 /lib/libc/sys
parentAUDIO_ENCODING_* is below, not above the struct description (diff)
downloadwireguard-openbsd-55185975ed6b5ee0e44067173fd6600463357e6e.tar.xz
wireguard-openbsd-55185975ed6b5ee0e44067173fd6600463357e6e.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 and installed before building ld.so with this change. ok millert@ tedu@
Diffstat (limited to 'lib/libc/sys')
-rw-r--r--lib/libc/sys/mquery.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libc/sys/mquery.c b/lib/libc/sys/mquery.c
index 2cb28e27a9b..92856a2c70a 100644
--- a/lib/libc/sys/mquery.c
+++ b/lib/libc/sys/mquery.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mquery.c,v 1.1 2003/04/14 04:53:50 art Exp $ */
+/* $OpenBSD: mquery.c,v 1.2 2003/04/25 18:30:18 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));
}