diff options
Diffstat (limited to 'sys/compat/linux/linux_hdio.c')
| -rw-r--r-- | sys/compat/linux/linux_hdio.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/compat/linux/linux_hdio.c b/sys/compat/linux/linux_hdio.c index 1e4c6c03d3a..bcc3ac62298 100644 --- a/sys/compat/linux/linux_hdio.c +++ b/sys/compat/linux/linux_hdio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_hdio.c,v 1.1 2001/04/09 06:53:45 tholo Exp $ */ +/* $OpenBSD: linux_hdio.c,v 1.2 2001/10/26 12:03:27 art Exp $ */ /* $NetBSD: linux_hdio.c,v 1.1 2000/12/10 14:12:17 fvdl Exp $ */ /* @@ -77,18 +77,8 @@ linux_ioctl_hdio(struct proc *p, struct linux_sys_ioctl_args *uap, struct linux_hd_big_geometry hdg_big; fdp = p->p_fd; -#if 1 - if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL) + if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL) return (EBADF); -#else - if ((u_int)SCARG(uap, fd) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL || - (fp->f_iflags & FIF_WANTCLOSE) != 0) - return (EBADF); - - FILE_USE(fp); -#endif com = SCARG(uap, com); ioctlf = fp->f_ops->fo_ioctl; |
