diff options
| author | ad <ad@NetBSD.org> | 2008-03-21 21:54:58 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 2008-03-21 21:54:58 +0000 |
| commit | a9ca7a3734751f09c9dc4e1f645cd528fd403e8c (patch) | |
| tree | ff26aca94a1a611e6be984fcff411406b466507f /sys/compat/linux/common/linux_ioctl.c | |
| parent | c743ad71591a886accf44c9e93c1ff677b45a41f (diff) | |
Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
Diffstat (limited to 'sys/compat/linux/common/linux_ioctl.c')
| -rw-r--r-- | sys/compat/linux/common/linux_ioctl.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/compat/linux/common/linux_ioctl.c b/sys/compat/linux/common/linux_ioctl.c index 7cb6b082426..45b8c9ebbcd 100644 --- a/sys/compat/linux/common/linux_ioctl.c +++ b/sys/compat/linux/common/linux_ioctl.c @@ -1,7 +1,7 @@ -/* $NetBSD: linux_ioctl.c,v 1.52 2007/12/20 23:02:54 dsl Exp $ */ +/* $NetBSD: linux_ioctl.c,v 1.53 2008/03/21 21:54:58 ad Exp $ */ /*- - * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. + * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.52 2007/12/20 23:02:54 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ioctl.c,v 1.53 2008/03/21 21:54:58 ad Exp $"); #if defined(_KERNEL_OPT) #include "sequencer.h" @@ -119,15 +119,12 @@ linux_sys_ioctl(struct lwp *l, const struct linux_sys_ioctl_args *uap, register_ * device number and check if that is the sequencer entry. */ struct file *fp; - struct filedesc *fdp; struct vnode *vp; struct vattr va; extern const struct cdevsw sequencer_cdevsw; - fdp = l->l_proc->p_fd; - if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL) + if ((fp = fd_getfile(SCARG(uap, fd))) == NULL) return EBADF; - FILE_USE(fp); if (fp->f_type == DTYPE_VNODE && (vp = (struct vnode *)fp->f_data) != NULL && vp->v_type == VCHR && @@ -139,7 +136,7 @@ linux_sys_ioctl(struct lwp *l, const struct linux_sys_ioctl_args *uap, register_ else { error = linux_ioctl_termios(l, uap, retval); } - FILE_UNUSE(fp, l); + fd_putfile(SCARG(uap, fd)); #else error = linux_ioctl_termios(l, uap, retval); #endif |
