int epoll_fd;
int ret;
char buf[256];
- int offset;
+ int offset = 0;
epoll_fd = epoll_create(1);
if (epoll_fd < 0) {
return -1;
}
- if (!start_time)
- start_time = time(NULL);
-
ret = read_log_line(infd, buf, sizeof(buf), &offset);
if (ret < 0)
return ret;
continue;
}
+ if (!start_time)
+ start_time = time(NULL);
+
cur_time = time(NULL);
pr_info("%s\n", buf);