diff options
author | alfred <alfred@FreeBSD.org> | 2002-01-29 17:12:10 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-01-29 17:12:10 +0000 |
commit | b969e5c19835642b62dfd3f5a5493d5225af218b (patch) | |
tree | 976bda481fdf33a26ec8ef175e1ebcb2d7e67cf8 /sys | |
parent | 31c2c5362e2520bd064aff5d8b7dda9293e1a4f1 (diff) | |
download | FreeBSD-src-b969e5c19835642b62dfd3f5a5493d5225af218b.zip FreeBSD-src-b969e5c19835642b62dfd3f5a5493d5225af218b.tar.gz |
Backout 1.120, EINVAL isn't a proper error return when the passed fd is
negative, the 'pointer' referred to by the manpage is actually the
struct file's f_offset field.
Pointed out by: bde
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_descrip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index fe73aef..db41fbd 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1496,7 +1496,7 @@ _fget(struct thread *td, int fd, struct file **fpp, int flags, int hold) (fp = fdp->fd_ofiles[fd]) == NULL || fp->f_ops == &badfileops) { FILEDESC_UNLOCK(fdp); - return(fd < 0 ? EINVAL : EBADF); + return(EBADF); } /* |