Major coreutils update.
This commit is contained in:
+5
-5
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user