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
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
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
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
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
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
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
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
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
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
>if (entries_size < size) {
>memcpy(start, l, copy_len);
>start = (struct log_head *)
> &start->data[l->size];
>} else{
>entries_size -= copy_len;
>
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
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
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
14 matches
Mail list logo