diff options
author | Alfred Perlstein <alfred@FreeBSD.org> | 2002-01-14 00:13:45 +0000 |
---|---|---|
committer | Alfred Perlstein <alfred@FreeBSD.org> | 2002-01-14 00:13:45 +0000 |
commit | a4db49537b0def4e1a63bb696ab51b7549fcdf23 (patch) | |
tree | fe7842143c9585ef2ebb793d812ec71cc4488a51 /sys/kern/vfs_syscalls.c | |
parent | 59047ccadec9566c55492972f002d65a4e3f6460 (diff) | |
download | src-test2-a4db49537b0def4e1a63bb696ab51b7549fcdf23.tar.gz src-test2-a4db49537b0def4e1a63bb696ab51b7549fcdf23.zip |
Notes
Diffstat (limited to 'sys/kern/vfs_syscalls.c')
-rw-r--r-- | sys/kern/vfs_syscalls.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 75ac3d074c69..539c418c60e2 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1704,15 +1704,14 @@ lseek(td, uap) } */ *uap; { struct ucred *cred = td->td_proc->p_ucred; - register struct file *fp; + struct file *fp; struct vnode *vp; struct vattr vattr; off_t offset; int error, noneg; - fp = ffind_hold(td, uap->fd); - if (fp == NULL) - return (EBADF); + if ((error = fget(td, uap->fd, &fp)) != 0) + return (error); if (fp->f_type != DTYPE_VNODE) { fdrop(fp, td); return (ESPIPE); |