Home
last modified time | relevance | path

Searched refs:e_buf (Results 1 – 1 of 1) sorted by relevance

/system/core/logwrapper/
Dlogwrap.cpp89 struct ending_buf e_buf; member
121 static void add_line_to_circular_buf(struct ending_buf* e_buf, char* line, ssize_t line_len) { in add_line_to_circular_buf() argument
126 if (e_buf->buf == nullptr) { in add_line_to_circular_buf()
130 if (line_len > e_buf->buf_size) { in add_line_to_circular_buf()
134 free_len = e_buf->buf_size - e_buf->used_len; in add_line_to_circular_buf()
140 e_buf->read = (e_buf->read + needed_space) % e_buf->buf_size; in add_line_to_circular_buf()
141 e_buf->used_len -= needed_space; in add_line_to_circular_buf()
147 cnt = std::min(line_len, e_buf->buf_size - e_buf->write); in add_line_to_circular_buf()
148 memcpy(e_buf->buf + e_buf->write, line, cnt); in add_line_to_circular_buf()
150 memcpy(e_buf->buf, line + cnt, line_len - cnt); in add_line_to_circular_buf()
[all …]