summaryrefslogtreecommitdiffstats
path: root/lib/libstand/write.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2001-11-30 05:59:47 +0000
committeralfred <alfred@FreeBSD.org>2001-11-30 05:59:47 +0000
commit5dc107c9938a36ea720fe815c81da168e892d4b0 (patch)
treecb8e3ea13353c1b7242f7ae5533e7b3b105abc22 /lib/libstand/write.c
parent5ff0e015df7af6c4ea534e89f0d72736c0a44ba9 (diff)
downloadFreeBSD-src-5dc107c9938a36ea720fe815c81da168e892d4b0.zip
FreeBSD-src-5dc107c9938a36ea720fe815c81da168e892d4b0.tar.gz
Make the same fix for writes to RAW objects.
Diffstat (limited to 'lib/libstand/write.c')
-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 ea9d491..861a96f 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 += resid;
- return (resid);
+ f->f_offset += (bcount - resid);
+ return (bcount - resid);
}
resid = bcount;
if ((errno = (f->f_ops->fo_write)(f, dest, bcount, &resid)))
OpenPOWER on IntegriCloud