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_file64.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_file64.c')
| -rw-r--r-- | sys/compat/linux/common/linux_file64.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/compat/linux/common/linux_file64.c b/sys/compat/linux/common/linux_file64.c index 72646b2c5d5..1724b7a3e5a 100644 --- a/sys/compat/linux/common/linux_file64.c +++ b/sys/compat/linux/common/linux_file64.c @@ -1,7 +1,7 @@ -/* $NetBSD: linux_file64.c,v 1.45 2008/02/02 19:37:53 dsl Exp $ */ +/* $NetBSD: linux_file64.c,v 1.46 2008/03/21 21:54:58 ad Exp $ */ /*- - * Copyright (c) 1995, 1998, 2000 The NetBSD Foundation, Inc. + * Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.45 2008/02/02 19:37:53 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.46 2008/03/21 21:54:58 ad Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -130,7 +130,7 @@ linux_sys_fstat64(struct lwp *l, const struct linux_sys_fstat64_args *uap, regis struct stat tmpst; int error; - error = do_sys_fstat(l, SCARG(uap, fd), &tmpst); + error = do_sys_fstat(SCARG(uap, fd), &tmpst); if (error != 0) return error; @@ -146,7 +146,7 @@ linux_do_stat64(struct lwp *l, const struct linux_sys_stat64_args *uap, register struct stat tmpst; int error; - error = do_sys_stat(l, SCARG(uap, path), flags, &tmpst); + error = do_sys_stat(SCARG(uap, path), flags, &tmpst); if (error != 0) return error; @@ -240,7 +240,7 @@ linux_sys_getdents64(struct lwp *l, const struct linux_sys_getdents64_args *uap, int len, reclen; /* BSD-format */ char *outp; /* Linux-format */ int resid, linux_reclen = 0; /* Linux-format */ - struct file *fp; + file_t *fp; struct uio auio; struct iovec aiov; struct linux_dirent64 idb; @@ -251,7 +251,7 @@ linux_sys_getdents64(struct lwp *l, const struct linux_sys_getdents64_args *uap, int ncookies; /* getvnode() will use the descriptor for us */ - if ((error = getvnode(l->l_proc->p_fd, SCARG(uap, fd), &fp)) != 0) + if ((error = getvnode(SCARG(uap, fd), &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) { @@ -355,6 +355,6 @@ out: free(cookiebuf, M_TEMP); free(tbuf, M_TEMP); out1: - FILE_UNUSE(fp, l); + fd_putfile(SCARG(uap, fd)); return error; } |
