Home
last modified time | relevance | path

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

/system/core/logwrapper/
Dlogwrap.c86 struct ending_buf e_buf; member
120 static void add_line_to_circular_buf(struct ending_buf *e_buf, in add_line_to_circular_buf() argument
127 if (e_buf->buf == NULL) { in add_line_to_circular_buf()
131 if (line_len > e_buf->buf_size) { in add_line_to_circular_buf()
135 free_len = e_buf->buf_size - e_buf->used_len; in add_line_to_circular_buf()
141 e_buf->read = (e_buf->read + needed_space) % e_buf->buf_size; in add_line_to_circular_buf()
142 e_buf->used_len -= needed_space; in add_line_to_circular_buf()
148 cnt = MIN(line_len, e_buf->buf_size - e_buf->write); in add_line_to_circular_buf()
149 memcpy(e_buf->buf + e_buf->write, line, cnt); in add_line_to_circular_buf()
151 memcpy(e_buf->buf, line + cnt, line_len - cnt); in add_line_to_circular_buf()
[all …]