Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/libbb/read_printf.c

    r3232 r3621  
    4646 * Thankfully, poll() doesn't care about O_NONBLOCK flag.
    4747 */
    48 ssize_t FAST_FUNC nonblock_immune_read(int fd, void *buf, size_t count, int loop_on_EINTR)
     48ssize_t FAST_FUNC nonblock_immune_read(int fd, void *buf, size_t count)
    4949{
    5050    struct pollfd pfd[1];
     
    5252
    5353    while (1) {
    54         n = loop_on_EINTR ? safe_read(fd, buf, count) : read(fd, buf, count);
     54        n = safe_read(fd, buf, count);
    5555        if (n >= 0 || errno != EAGAIN)
    5656            return n;
     
    5959        pfd[0].events = POLLIN;
    6060        /* note: safe_poll pulls in printf */
    61         loop_on_EINTR ? safe_poll(pfd, 1, -1) : poll(pfd, 1, -1);
     61        safe_poll(pfd, 1, -1);
    6262    }
    6363}
     
    8282            sz += 128;
    8383        }
    84         if (nonblock_immune_read(fd, p, 1, /*loop_on_EINTR:*/ 1) != 1) {
     84        if (nonblock_immune_read(fd, p, 1) != 1) {
    8585            /* EOF/error */
    8686            if (p == buf) { /* we read nothing */
Note: See TracChangeset for help on using the changeset viewer.