Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2003-03-19 12:13:01 +0300
committerManuel Novoa III <mjn3@codepoet.org>2003-03-19 12:13:01 +0300
commitcad5364599eb5062d59e0c397ed638ddd61a8d5d (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /libbb/full_write.c
parente01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff)
Major coreutils update.
Diffstat (limited to 'libbb/full_write.c')
-rw-r--r--libbb/full_write.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libbb/full_write.c b/libbb/full_write.c
index a2c07fbc9..1106a53b4 100644
--- a/libbb/full_write.c
+++ b/libbb/full_write.c
@@ -28,10 +28,10 @@
* This does multiple writes as necessary.
* Returns the amount written, or -1 on an error.
*/
-int full_write(int fd, const char *buf, int len)
+ssize_t bb_full_write(int fd, const void *buf, size_t len)
{
- int cc;
- int total;
+ ssize_t cc;
+ ssize_t total;
total = 0;
@@ -39,10 +39,10 @@ int full_write(int fd, const char *buf, int len)
cc = write(fd, buf, len);
if (cc < 0)
- return -1;
+ return cc; /* write() returns -1 on failure. */
- buf += cc;
total += cc;
+ buf = ((const char *)buf) + cc;
len -= cc;
}