diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-10-10 23:43:45 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-10-10 23:43:45 +0000 |
commit | c26325bea28d2b02fb588b6523bed61000e182a9 (patch) | |
tree | c2ff77e7a65cccc479c16783fc2920e72ec9895a | |
parent | 1f4fb096600219d4a2e8eead7cafb9ef3bb60bab (diff) |
Don't roll our own dup, we cen use the standard one.
-rw-r--r-- | sys/compat/hpux/hpux_compat.c | 32 | ||||
-rw-r--r-- | sys/compat/hpux/syscalls.master | 4 |
2 files changed, 3 insertions, 33 deletions
diff --git a/sys/compat/hpux/hpux_compat.c b/sys/compat/hpux/hpux_compat.c index c7837715054..69ffa2435d7 100644 --- a/sys/compat/hpux/hpux_compat.c +++ b/sys/compat/hpux/hpux_compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hpux_compat.c,v 1.12 2000/08/24 10:41:51 art Exp $ */ +/* $OpenBSD: hpux_compat.c,v 1.13 2001/10/10 23:43:44 art Exp $ */ /* $NetBSD: hpux_compat.c,v 1.35 1997/05/08 16:19:48 mycroft Exp $ */ /* @@ -376,36 +376,6 @@ hpux_sys_writev(p, v, retval) return (error); } -/* - * 4.3bsd dup allows dup2 to come in on the same syscall entry - * and hence allows two arguments. HP-UX dup has only one arg. - */ -int -hpux_sys_dup(p, v, retval) - struct proc *p; - void *v; - register_t *retval; -{ - struct hpux_sys_dup_args *uap = v; - struct filedesc *fdp = p->p_fd; - struct file *fp; - int fd, error; - - if (((unsigned)SCARG(uap, fd)) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL) - return (EBADF); - if ((error = fdalloc(p, 0, &fd))) - return (error); - fdp->fd_ofiles[fd] = fp; - fdp->fd_ofileflags[fd] = - fdp->fd_ofileflags[SCARG(uap, fd)] &~ UF_EXCLOSE; - fp->f_count++; - if (fd > fdp->fd_lastfile) - fdp->fd_lastfile = fd; - *retval = fd; - return (0); -} - int hpux_sys_utssys(p, v, retval) struct proc *p; diff --git a/sys/compat/hpux/syscalls.master b/sys/compat/hpux/syscalls.master index ab31f1556fc..cee4bdeb548 100644 --- a/sys/compat/hpux/syscalls.master +++ b/sys/compat/hpux/syscalls.master @@ -1,4 +1,4 @@ - $OpenBSD: syscalls.master,v 1.6 1999/06/07 07:17:46 deraadt Exp $ + $OpenBSD: syscalls.master,v 1.7 2001/10/10 23:43:44 art Exp $ ; $NetBSD: syscalls.master,v 1.13 1997/03/16 03:48:04 thorpej Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -89,7 +89,7 @@ 38 STD { int hpux_sys_stat(char *path, struct hpux_stat *sb); } 39 STD { int hpux_sys_setpgrp_6x(void); } 40 STD { int hpux_sys_lstat(char *path, struct hpux_stat *sb); } -41 STD { int hpux_sys_dup(int fd); } +41 NOARGS { int sys_dup(int fd); } 42 NOARGS { int sys_opipe(void); } 43 STD { int hpux_sys_times_6x(struct tms *tms); } 44 NOARGS { int sys_profil(caddr_t samples, u_int size, \ |