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); }