Re: [LEDE-DEV] [PATCH] [ubox] syslog: remove unnecessary sizeof struct between messages

2017-03-12 Thread Dan Bugnar
I couldn't find a good reason for using the sizeof() here, also I worked on a resize feature. I will send my work after this patch situation is clarified. On Fri, Mar 10, 2017 at 12:57 PM, John Crispin wrote: > > > On 10/03/17 11:06, Dan Bugnar wrote: >> >> The next m

[LEDE-DEV] [PATCH] [ubox] syslog: remove unnecessary sizeof struct between messages

2017-03-10 Thread Dan Bugnar
The next message needs to be written after the data of current message. This was adding "sizeof(struct log_head)" bytes between messages. Signed-off-by: Dan Bugnar --- log/syslog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log/syslog.c b/log/syslog.c ind

[LEDE-DEV] [PATCH 1/2] [ubox] syslog: use realloc to change log buffer size

2016-05-12 Thread Dan Bugnar
From: Dan Bugnar Change the log buffer size and copy the messages. Signed-off-by: Dan Bugnar --- log/syslog.c | 37 +++-- log/syslog.h | 2 +- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/log/syslog.c b/log/syslog.c index e8b6774..d6cb868

[LEDE-DEV] [PATCH 2/2] [ubox] logd: add ubus reload method

2016-05-12 Thread Dan Bugnar
From: Dan Bugnar Add logd link to uci library, to read the system config file and get the buffer size. Remove the -S option support and use just the option from the config file. Signed-off-by: Dan Bugnar --- CMakeLists.txt | 2 +- log/logd.c | 60

[LEDE-DEV] [PATCH] add libuci as a depends for logd

2016-05-12 Thread Dan Bugnar
We need libuci in case we add the reload method. --- package/system/ubox/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile index f9f1ac1..d20634a 100644 --- a/package/system/ubox/Makefile +++ b/package/system/ub

[LEDE-DEV] [PATCH 1/2] [ubox] syslog: use realloc to change log buffer size

2016-05-18 Thread Dan Bugnar
From: Dan Bugnar Change the log buffer size and copy the messages. Signed-off-by: Dan Bugnar --- log/syslog.c | 37 +++-- log/syslog.h | 2 +- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/log/syslog.c b/log/syslog.c index e8b6774..d6cb868

[LEDE-DEV] [PATCH 2/2] [ubox] logd: add ubus reload method

2016-05-18 Thread Dan Bugnar
From: Dan Bugnar Add ubus method to set the buffer size. Signed-off-by: Dan Bugnar --- log/logd.c | 28 +++- log/syslog.c | 8 +--- log/syslog.h | 2 +- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/log/logd.c b/log/logd.c index 27d3cac

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

2016-06-03 Thread Dan Bugnar
buffer. Signed-off-by: Dan Bugnar --- log/syslog.c | 36 +++- log/syslog.h | 2 +- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/log/syslog.c b/log/syslog.c index 2042e93..e24c678 100644 --- a/log/syslog.c +++ b/log/syslog.c @@ -42,7 +42,7

[LEDE-DEV] [PATCH 3/3] [ubox] logd: add ubus reload method

2016-06-03 Thread Dan Bugnar
Add ubus method to set the buffer size. Example: ubus call log reload "{\"log_buffer_size\":size}" Signed-off-by: Dan Bugnar --- log/logd.c | 25 + 1 file changed, 25 insertions(+) diff --git a/log/logd.c b/log/logd.c index 27d3cac..563c

[LEDE-DEV] [PATCH 1/3] [ubox] remove unnecessary size struct between messages

2016-06-03 Thread Dan Bugnar
From: Dan Bugnar The next message needs to be written after the data of current message. This was adding "sizeof(struct log_head)" bytes between messages. Signed-off-by: Dan Bugnar --- log/syslog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log/syslog.c b/lo

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

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

[LEDE-DEV] [ubox] logd: add ubus reload method

2016-06-07 Thread Dan Bugnar
Add ubus method to set the buffer size. Example: ubus call log reload "{\"log_buffer_size\":size}" Signed-off-by: Dan Bugnar --- log/logd.c | 25 + 1 file changed, 25 insertions(+) diff --git a/log/logd.c b/log/logd.c index 27d3cac..563c

[LEDE-DEV] [ubox] syslog: change log buffer size

2016-06-07 Thread Dan Bugnar
buffer. Signed-off-by: Dan Bugnar --- log/syslog.c | 41 +++-- log/syslog.h | 2 +- 2 files changed, 32 insertions(+), 11 deletions(-) diff --git a/log/syslog.c b/log/syslog.c index 2042e93..0183d4e 100644 --- a/log/syslog.c +++ b/log/syslog.c @@ -42,7 +42,7

[LEDE-DEV] [ubox] remove unnecessary size struct between messages

2016-06-07 Thread Dan Bugnar
From: Dan Bugnar The next message needs to be written after the data of current message. This was adding "sizeof(struct log_head)" bytes between messages. Signed-off-by: Dan Bugnar --- log/syslog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log/syslog.c b/lo