diff options
author | alfred <alfred@FreeBSD.org> | 2001-11-30 05:54:30 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2001-11-30 05:54:30 +0000 |
commit | 5ff0e015df7af6c4ea534e89f0d72736c0a44ba9 (patch) | |
tree | 160dc6948442456ffa89a9414e7586f6486d00d6 | |
parent | 2ed59f2ae680c31aec5b79fdd8158d8340a6dd65 (diff) | |
download | FreeBSD-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.c | 2 |
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); } |