Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/compat/hpux Pull up revision 1.56 (requested by tho...



details:   https://anonhg.NetBSD.org/src/rev/f460c1b1a242
branches:  netbsd-1-5
changeset: 491860:f460c1b1a242
user:      he <he%NetBSD.org@localhost>
date:      Thu Jun 07 19:55:59 2001 +0000

description:
Pull up revision 1.56 (requested by thorpej):
  Use the NetBSD version of dup(2) instead of our own (incorrect!)
  version.

diffstat:

 sys/compat/hpux/hpux_compat.c |  32 +-------------------------------
 1 files changed, 1 insertions(+), 31 deletions(-)

diffs (46 lines):

diff -r a2b912e46a4d -r f460c1b1a242 sys/compat/hpux/hpux_compat.c
--- a/sys/compat/hpux/hpux_compat.c     Thu Jun 07 19:53:06 2001 +0000
+++ b/sys/compat/hpux/hpux_compat.c     Thu Jun 07 19:55:59 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hpux_compat.c,v 1.49.4.1 2000/07/13 20:15:12 thorpej Exp $     */
+/*     $NetBSD: hpux_compat.c,v 1.49.4.2 2001/06/07 19:55:59 he Exp $  */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -364,36 +364,6 @@
        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;



Home | Main Index | Thread Index | Old Index