summaryrefslogtreecommitdiff
path: root/sys/compat/ultrix/ultrix_pathname.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2002-02-02 16:05:59 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2002-02-02 16:05:59 +0000
commit1be6a40a464e4e44fb84b7d1fa048a217bbdeece (patch)
tree7e6c611fd09febf362436ee21ca66f3e3ab1fcaf /sys/compat/ultrix/ultrix_pathname.c
parent5bdfd47e797e6f77a7f3809b3f0552d0218a364b (diff)
Be more consistent about using fd_getfile where it matters.
Diffstat (limited to 'sys/compat/ultrix/ultrix_pathname.c')
-rw-r--r--sys/compat/ultrix/ultrix_pathname.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/compat/ultrix/ultrix_pathname.c b/sys/compat/ultrix/ultrix_pathname.c
index 80ea178d427..b4e55576064 100644
--- a/sys/compat/ultrix/ultrix_pathname.c
+++ b/sys/compat/ultrix/ultrix_pathname.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ultrix_pathname.c,v 1.4 2000/04/21 15:50:21 millert Exp $ */
+/* $OpenBSD: ultrix_pathname.c,v 1.5 2002/02/02 16:05:58 art Exp $ */
/* $NetBSD: ultrix_pathname.c,v 1.2 1996/04/07 17:23:07 jonathan Exp $ */
/*
@@ -185,8 +185,10 @@ ultrix_sys_open(p, v, retval)
if (!ret && !noctty && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
struct filedesc *fdp = p->p_fd;
- struct file *fp = fdp->fd_ofiles[*retval];
+ struct file *fp;
+ if ((fd = fd_getfile(fdp, *retval)) == NULL)
+ return (EBADF);
/* ignore any error, just give it a try */
if (fp->f_type == DTYPE_VNODE)
(fp->f_ops->fo_ioctl)(fp, TIOCSCTTY, (caddr_t)0, p);