From 5ff0e015df7af6c4ea534e89f0d72736c0a44ba9 Mon Sep 17 00:00:00 2001 From: alfred Date: Fri, 30 Nov 2001 05:54:30 +0000 Subject: write should return the number of bytes written, not 0 on success. Submitted by: Jonathan Mini PR: kern/32350 --- lib/libstand/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libstand/write.c') 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); } -- cgit v1.1