Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (13 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi-busybox/libbb/full_write.c

    r1765 r2725  
    55 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
    66 *
    7  * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
     7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
    88 */
    99
     
    1515 * Returns the amount written, or -1 on an error.
    1616 */
    17 ssize_t full_write(int fd, const void *buf, size_t len)
     17ssize_t FAST_FUNC full_write(int fd, const void *buf, size_t len)
    1818{
    1919    ssize_t cc;
     
    2525        cc = safe_write(fd, buf, len);
    2626
    27         if (cc < 0)
    28             return cc;  /* write() returns -1 on failure. */
     27        if (cc < 0) {
     28            if (total) {
     29                /* we already wrote some! */
     30                /* user can do another write to know the error code */
     31                return total;
     32            }
     33            return cc;  /* write() returns -1 on failure. */
     34        }
    2935
    3036        total += cc;
Note: See TracChangeset for help on using the changeset viewer.