aboutsummaryrefslogtreecommitdiff
path: root/lib/libstand
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2001-11-30 05:54:30 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2001-11-30 05:54:30 +0000
commitfd19a949b49aefa355e422840d932ed6eed4433d (patch)
tree160dc6948442456ffa89a9414e7586f6486d00d6 /lib/libstand
parentf2f94c9675c0ccb3373d1aaf5da277fe6e1c9d53 (diff)
downloadsrc-fd19a949b49aefa355e422840d932ed6eed4433d.tar.gz
src-fd19a949b49aefa355e422840d932ed6eed4433d.zip
write should return the number of bytes written, not 0 on success.
Submitted by: Jonathan Mini <mini@haikugeek.com> PR: kern/32350
Notes
Notes: svn path=/head/; revision=87111
Diffstat (limited to 'lib/libstand')
-rw-r--r--lib/libstand/write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libstand/write.c b/lib/libstand/write.c
index 022e77068383..ea9d491afa9c 100644
--- a/lib/libstand/write.c
+++ b/lib/libstand/write.c
@@ -95,5 +95,5 @@ write(fd, dest, bcount)
resid = bcount;
if ((errno = (f->f_ops->fo_write)(f, dest, bcount, &resid)))
return (-1);
- return (0);
+ return (bcount - resid);
}