summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libstand/write.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libstand/write.c b/lib/libstand/write.c
index 861a96f..ea9d491 100644
--- a/lib/libstand/write.c
+++ b/lib/libstand/write.c
@@ -89,8 +89,8 @@ write(fd, dest, bcount)
btodb(f->f_offset), bcount, dest, &resid);
if (errno)
return (-1);
- f->f_offset += (bcount - resid);
- return (bcount - resid);
+ f->f_offset += resid;
+ return (resid);
}
resid = bcount;
if ((errno = (f->f_ops->fo_write)(f, dest, bcount, &resid)))
OpenPOWER on IntegriCloud