From 4d9797e030908cb9c1b8196b3a7ba7d79c3e6e25 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 1 Jul 2003 22:18:10 +0000 Subject: remove sys_omquery. it was only used for two weeks, and you can't source upgrade from a system that used it anyway. ok art deraadt drahn --- sys/kern/syscalls.master | 5 ++-- sys/uvm/uvm_mmap.c | 74 +----------------------------------------------- 2 files changed, 3 insertions(+), 76 deletions(-) (limited to 'sys') diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 2b70eaeb954..3683ff376cd 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.60 2003/06/23 04:26:53 deraadt Exp $ +; $OpenBSD: syscalls.master,v 1.61 2003/07/01 22:18:09 tedu Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -572,7 +572,6 @@ gid_t *sgid); } 284 STD { int sys_setresgid(gid_t rgid, gid_t egid, \ gid_t sgid); } -285 STD { int sys_omquery(int flags, void **addr, \ - size_t size, int fd, off_t off); } +285 OBSOL sys_omquery 286 STD { void *sys_mquery(void *addr, size_t len, int prot, \ int flags, int fd, long pad, off_t pos); } diff --git a/sys/uvm/uvm_mmap.c b/sys/uvm/uvm_mmap.c index 30b72e891f5..3d2dd68e305 100644 --- a/sys/uvm/uvm_mmap.c +++ b/sys/uvm/uvm_mmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_mmap.c,v 1.46 2003/05/17 14:02:06 grange Exp $ */ +/* $OpenBSD: uvm_mmap.c,v 1.47 2003/07/01 22:18:09 tedu Exp $ */ /* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */ /* @@ -208,78 +208,6 @@ done: return (error); } -/* ARGSUSED */ -int -sys_omquery(struct proc *p, void *v, register_t *retval) -{ - struct sys_omquery_args /* { - syscallarg(int) flags; - syscallarg(void **) addr; - syscallarg(size_t) size; - syscallarg(int) fd; - syscallarg(off_t) off; - } */ *uap = v; - struct file *fp; - struct uvm_object *uobj; - voff_t uoff; - int error; - vaddr_t vaddr; - int flags = 0; - vm_prot_t prot = SCARG(uap, flags) & VM_PROT_ALL; - - if (SCARG(uap, flags) & MAP_FIXED) - flags |= UVM_FLAG_FIXED; - - if ((error = copyin(SCARG(uap, addr), &vaddr, sizeof(void *))) != 0) - return (error); - - if (SCARG(uap, fd) >= 0) { - if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0) - return (error); - uobj = &((struct vnode *)fp->f_data)->v_uvm.u_obj; - uoff = SCARG(uap, off); - } else { - fp = NULL; - uobj = NULL; - uoff = 0; - } - - if (vaddr == 0) - vaddr = uvm_map_hint(p, prot); - - /* prevent a user requested address from falling in heap space */ - if ((vaddr + SCARG(uap, size) > (vaddr_t)p->p_vmspace->vm_daddr) && - (vaddr < (vaddr_t)p->p_vmspace->vm_daddr + MAXDSIZ)) { - if (flags & UVM_FLAG_FIXED) { - error = EINVAL; - goto done; - } - vaddr = round_page((vaddr_t)p->p_vmspace->vm_daddr + MAXDSIZ); - } - - if (uvm_map_findspace(&p->p_vmspace->vm_map, vaddr, SCARG(uap, size), - &vaddr, uobj, uoff, 0, flags) == NULL) { - if (flags & UVM_FLAG_FIXED) - error = EINVAL; - else - error = ENOMEM; - } else { - /* - * XXX? - * is it possible for uvm_map_findspace() to return - * an address in vm_addr - vm_addr+MAXDSIZ ? - * if all of the memory below 1G (i386) is used, - * this could occur. In this case, could this loop - * changing the hint to above daddr in that case? - */ - error = copyout(&vaddr, SCARG(uap, addr), sizeof(void *)); - } -done: - if (fp != NULL) - FRELE(fp); - return (error); -} - /* * sys_mincore: determine if pages are in core or not. */ -- cgit v1.2.3