[LEDE-DEV] Fwd: [PATCH 2/3] [ubox] syslog: change log buffer size

Dan Bugnar danutbug at gmail.com
Tue Jun 7 00:05:47 PDT 2016


>                        if (entries_size < size) {
>                                memcpy(start, l, copy_len);
>                                start = (struct log_head *) &start->data[l->size];
>                        } else{
>                                entries_size -= copy_len;
>                        }
>

Yes, the first block is executed just when the entries_size it fits in
the new buffer size, otherwise we skip entries in the second block.

>   void
>   log_init(int _log_size)
>   {
>        if (_log_size > 0)
>                log_size = _log_size;
>
> what happened to log_size ? if you dont use it anymore remove it fully
> please
>
log_size is used when the new buffer size is equal to the current
buffer size and we keep the current buffer intact.



More information about the Lede-dev mailing list