summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_generic.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-01-06 16:34:22 +0000
committerjhb <jhb@FreeBSD.org>2006-01-06 16:34:22 +0000
commit0beb1bf77b0408ab7b2210a0f1b220e2d7ff8a6d (patch)
tree7df3112906e6324fb2f9c0f05b946e9ebda5f551 /sys/kern/sys_generic.c
parente851a1b52aa81242bee0ce1da1d3d2172f0e670d (diff)
downloadFreeBSD-src-0beb1bf77b0408ab7b2210a0f1b220e2d7ff8a6d.zip
FreeBSD-src-0beb1bf77b0408ab7b2210a0f1b220e2d7ff8a6d.tar.gz
Return error from fget_write() rather than hardcoding EBADF now that
fget_write() DTRT. Requested by: bde
Diffstat (limited to 'sys/kern/sys_generic.c')
-rw-r--r--sys/kern/sys_generic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index 43d2758..e8cb5e9 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)
OpenPOWER on IntegriCloud