summaryrefslogtreecommitdiff
path: root/lib/libc/sys
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2003-04-28 21:32:09 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2003-04-28 21:32:09 +0000
commitc106c73dfd41f77fe797883162069614720a47f9 (patch)
tree181c1749c1f858436214069f2ce9f027ed804691 /lib/libc/sys
parent2050ddbc7001fceb763e62efe6d646ef12228f05 (diff)
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/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 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));
}