Ignore:
Timestamp:
Nov 6, 2007, 9:23:18 PM (12 years ago)
Author:
Bruno Cornec
Message:

Update mindi-busybox to 1.7.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mindi-busybox/coreutils/tail.c

    r1765 r1772  
    4848{
    4949    ssize_t r;
    50     off_t current, end;
     50    off_t current;
    5151    struct stat sbuf;
    5252
    53     end = current = lseek(fd, 0, SEEK_CUR);
    54     if (!fstat(fd, &sbuf))
    55         end = sbuf.st_size;
    56     lseek(fd, end < current ? 0 : current, SEEK_SET);
     53    /* (A good comment is missing here) */
     54    current = lseek(fd, 0, SEEK_CUR);
     55    /* /proc files report zero st_size, don't lseek them. */
     56    if (fstat(fd, &sbuf) == 0 && sbuf.st_size)
     57        if (sbuf.st_size < current)
     58            lseek(fd, 0, SEEK_SET);
     59
    5760    r = safe_read(fd, buf, count);
    5861    if (r < 0) {
     
    6871static unsigned eat_num(const char *p)
    6972{
    70     if (*p == '-') p++;
    71     else if (*p == '+') { p++; G.status = EXIT_FAILURE; }
     73    if (*p == '-')
     74        p++;
     75    else if (*p == '+') {
     76        p++;
     77        G.status = EXIT_FAILURE;
     78    }
    7279    return xatou_sfx(p, tail_suffixes);
    7380}
Note: See TracChangeset for help on using the changeset viewer.