X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=main.c;h=256a0223ee88b50cac6440665f1552219e281a42;hp=b17f053bb3ea351853d2855d94a41b3728da684f;hb=6dfd44e127c153e721a398f22b510be1a5e9d0b0;hpb=416b41368c72d3af4c0e89a7b522b28ea13a6ce4 diff --git a/main.c b/main.c index b17f053..256a022 100644 --- a/main.c +++ b/main.c @@ -94,12 +94,14 @@ netifd_process_log_cb(struct uloop_fd *fd, unsigned int events) retry: read_len = len = read(fd->fd, buf, maxlen); - if (len <= 0) { - if (errno == EINTR) + if (len < 0) { + if (errno == EAGAIN) goto retry; goto out; - } + } else if (len == 0) + goto out; + proc->log_buf_ofs += len; cur = buf;