From 0521bbfeade0ec611aa4101cbfa1c242c51dc420 Mon Sep 17 00:00:00 2001 From: "jk7744.park" Date: Sat, 24 Oct 2015 17:03:29 +0900 Subject: tizen 2.4 release --- src/libdlog/log.c | 3 +++ src/libdlog/loglimiter.c | 1 + src/logger/logger.c | 2 +- src/logutil/logutil.c | 5 ++--- src/shared/logprint.c | 10 +++++++--- 5 files changed, 14 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/libdlog/log.c b/src/libdlog/log.c index 46fa2d1..7ac948b 100755 --- a/src/libdlog/log.c +++ b/src/libdlog/log.c @@ -27,7 +27,10 @@ #include #include #include + +#include #include + #include "loglimiter.h" #include "logconfig.h" #ifdef HAVE_SYSTEMD_JOURNAL diff --git a/src/libdlog/loglimiter.c b/src/libdlog/loglimiter.c index a0e874e..644c7ac 100644 --- a/src/libdlog/loglimiter.c +++ b/src/libdlog/loglimiter.c @@ -31,6 +31,7 @@ #include /* Included for priorities level */ +#include #include #include "loglimiter.h" diff --git a/src/logger/logger.c b/src/logger/logger.c index 6b3a5cf..249dc60 100644 --- a/src/logger/logger.c +++ b/src/logger/logger.c @@ -45,7 +45,7 @@ #define COMMAND_MAX 5 #define DELIMITER " " -#define FILE_PERMS (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH) +#define FILE_PERMS (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP) #define MAX_ARGS 16 #define MAX_ROTATED 4 #define MAX_QUEUED 4096 diff --git a/src/logutil/logutil.c b/src/logutil/logutil.c index ea96cfb..2fcd8ff 100755 --- a/src/logutil/logutil.c +++ b/src/logutil/logutil.c @@ -286,7 +286,6 @@ static void read_log_lines(struct log_device_t* devices) exit(EXIT_FAILURE); } - entry->entry.msg[entry->entry.len] = '\0'; enqueue(dev, entry); @@ -737,7 +736,7 @@ int main(int argc, char **argv) } } - if (getLogSize) { + if (getLogSize || g_nonblock) { int size, readable; size = get_log_size(dev->fd); @@ -751,7 +750,7 @@ int main(int argc, char **argv) perror("ioctl"); exit(EXIT_FAILURE); } - + g_log_rotate_size_kbytes += size / 1024; printf("%s: ring buffer is %dKb (%dKb consumed), " "max entry is %db, max payload is %db\n", dev->device, size / 1024, readable / 1024, diff --git a/src/shared/logprint.c b/src/shared/logprint.c index 6ab4d72..e58a661 100755 --- a/src/shared/logprint.c +++ b/src/shared/logprint.c @@ -287,14 +287,18 @@ int log_add_filter_rule(log_format *p_format, pri = DLOG_VERBOSE; } - char *tagName; + char *tagName = NULL; tagName = strndup(filterExpression, tagNameLength); + if (!tagName) { + goto error; + } FilterInfo *p_fi = filterinfo_new(tagName, pri); free(tagName); - if (!p_fi) - goto error; + if (!p_fi) { + goto error; + } p_fi->p_next = p_format->filters; p_format->filters = p_fi; } -- cgit v1.2.3