write should return the number of bytes written, not 0 on success.

Submitted by: Jonathan Mini <mini@haikugeek.com>
PR: kern/32350
This commit is contained in:
Alfred Perlstein 2001-11-30 05:54:30 +00:00
parent f2f94c9675
commit fd19a949b4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87111

View File

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