summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-11-30 05:54:30 +0000
committeralfred <alfred@FreeBSD.org>2001-11-30 05:54:30 +0000
commit5ff0e015df7af6c4ea534e89f0d72736c0a44ba9 (patch)
tree160dc6948442456ffa89a9414e7586f6486d00d6
parent2ed59f2ae680c31aec5b79fdd8158d8340a6dd65 (diff)
downloadFreeBSD-src-5ff0e015df7af6c4ea534e89f0d72736c0a44ba9.zip
FreeBSD-src-5ff0e015df7af6c4ea534e89f0d72736c0a44ba9.tar.gz
write should return the number of bytes written, not 0 on success.
Submitted by: Jonathan Mini <mini@haikugeek.com> PR: kern/32350
-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 022e770..ea9d491 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);
}
OpenPOWER on IntegriCloud