summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2006-01-06 16:34:22 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2006-01-06 16:34:22 +0000
commitaf56abaab52cbfc41b957c4e3100ffbed7a128a3 (patch)
tree7df3112906e6324fb2f9c0f05b946e9ebda5f551 /sys/kern
parent38f63f7e47372686ec51506514ac2278884d3b9c (diff)
Notes
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/sys_generic.c4
-rw-r--r--sys/kern/vfs_aio.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index 43d2758899ba..e8cb5e998213 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -398,7 +398,7 @@ kern_writev(struct thread *td, int fd, struct uio *auio)
error = fget_write(td, fd, &fp);
if (error)
- return (EBADF);
+ return (error);
error = dofilewrite(td, fd, fp, auio, (off_t)-1, 0);
fdrop(fp, td);
return (error);
@@ -444,7 +444,7 @@ kern_pwritev(td, fd, auio, offset)
error = fget_write(td, fd, &fp);
if (error)
- return (EBADF);
+ return (error);
if (!(fp->f_ops->fo_flags & DFLAG_SEEKABLE))
error = ESPIPE;
else if (offset < 0 && fp->f_vnode->v_type != VCHR)
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 3ead26f3750e..5466959c03bc 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -1447,7 +1447,7 @@ _aio_aqueue(struct thread *td, struct aiocb *job, struct aio_liojob *lj,
uma_zfree(aiocb_zone, aiocbe);
if (type == 0)
suword(&job->_aiocb_private.error, EBADF);
- return (EBADF);
+ return (error);
}
aiocbe->fd_file = fp;