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/fclose_nonstdin.c

    r1765 r2725  
    55 * Copyright (C) 2003  Manuel Novoa III  <mjn3@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#include "libbb.h"
    1616
    17 int fclose_if_not_stdin(FILE *f)
     17int FAST_FUNC fclose_if_not_stdin(FILE *f)
    1818{
    19     if (f != stdin) {
    20         return fclose(f);
    21     }
    22     return 0;
     19    /* Some more paranoid applets want ferror() check too */
     20    int r = ferror(f); /* NB: does NOT set errno! */
     21    if (r) errno = EIO; /* so we'll help it */
     22    if (f != stdin)
     23        return (r | fclose(f)); /* fclose does set errno on error */
     24    return r;
    2325}
Note: See TracChangeset for help on using the changeset viewer.