Ignore:
Timestamp:
Feb 25, 2011, 9:26:54 PM (9 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/debianutils/pipe_progress.c

    r1765 r2725  
    55 * Copyright (C) 2003 by Rob Landley <rob@landley.net>, Joey Hess
    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 */
    9 
    109#include "libbb.h"
    1110
     
    1514 * Activity is indicated by a '.' to stderr
    1615 */
    17 int pipe_progress_main(int argc, char **argv);
    18 int pipe_progress_main(int argc, char **argv)
     16int pipe_progress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
     17int pipe_progress_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
    1918{
    20     RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE);
     19    char buf[PIPE_PROGRESS_SIZE];
    2120    time_t t = time(NULL);
    22     size_t len;
     21    int len;
    2322
    24     while ((len = fread(buf, 1, PIPE_PROGRESS_SIZE, stdin)) > 0) {
     23    while ((len = safe_read(STDIN_FILENO, buf, PIPE_PROGRESS_SIZE)) > 0) {
    2524        time_t new_time = time(NULL);
    2625        if (new_time != t) {
    2726            t = new_time;
    28             fputc('.', stderr);
     27            bb_putchar_stderr('.');
    2928        }
    30         fwrite(buf, len, 1, stdout);
     29        full_write(STDOUT_FILENO, buf, len);
    3130    }
    3231
    33     fputc('\n', stderr);
    34 
    35     if (ENABLE_FEATURE_CLEAN_UP)
    36         RELEASE_CONFIG_BUFFER(buf);
     32    bb_putchar_stderr('\n');
    3733
    3834    return 0;
Note: See TracChangeset for help on using the changeset viewer.