Commit 3537cdaa authored by San Mehat's avatar San Mehat Committed by Greg Kroah-Hartman

android: logger: Add new system log for framework/system log messages

Signed-off-by: default avatarSan Mehat <san@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0445f154
...@@ -558,6 +558,7 @@ static struct logger_log VAR = { \ ...@@ -558,6 +558,7 @@ static struct logger_log VAR = { \
DEFINE_LOGGER_DEVICE(log_main, LOGGER_LOG_MAIN, 64*1024) DEFINE_LOGGER_DEVICE(log_main, LOGGER_LOG_MAIN, 64*1024)
DEFINE_LOGGER_DEVICE(log_events, LOGGER_LOG_EVENTS, 256*1024) DEFINE_LOGGER_DEVICE(log_events, LOGGER_LOG_EVENTS, 256*1024)
DEFINE_LOGGER_DEVICE(log_radio, LOGGER_LOG_RADIO, 64*1024) DEFINE_LOGGER_DEVICE(log_radio, LOGGER_LOG_RADIO, 64*1024)
DEFINE_LOGGER_DEVICE(log_system, LOGGER_LOG_SYSTEM, 64*1024)
static struct logger_log *get_log_from_minor(int minor) static struct logger_log *get_log_from_minor(int minor)
{ {
...@@ -567,6 +568,8 @@ static struct logger_log *get_log_from_minor(int minor) ...@@ -567,6 +568,8 @@ static struct logger_log *get_log_from_minor(int minor)
return &log_events; return &log_events;
if (log_radio.misc.minor == minor) if (log_radio.misc.minor == minor)
return &log_radio; return &log_radio;
if (log_system.misc.minor == minor)
return &log_system;
return NULL; return NULL;
} }
...@@ -603,6 +606,10 @@ static int __init logger_init(void) ...@@ -603,6 +606,10 @@ static int __init logger_init(void)
if (unlikely(ret)) if (unlikely(ret))
goto out; goto out;
ret = init_log(&log_system);
if (unlikely(ret))
goto out;
out: out:
return ret; return ret;
} }
......
...@@ -32,6 +32,7 @@ struct logger_entry { ...@@ -32,6 +32,7 @@ struct logger_entry {
#define LOGGER_LOG_RADIO "log_radio" /* radio-related messages */ #define LOGGER_LOG_RADIO "log_radio" /* radio-related messages */
#define LOGGER_LOG_EVENTS "log_events" /* system/hardware events */ #define LOGGER_LOG_EVENTS "log_events" /* system/hardware events */
#define LOGGER_LOG_SYSTEM "log_system" /* system/framework messages */
#define LOGGER_LOG_MAIN "log_main" /* everything else */ #define LOGGER_LOG_MAIN "log_main" /* everything else */
#define LOGGER_ENTRY_MAX_LEN (4*1024) #define LOGGER_ENTRY_MAX_LEN (4*1024)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment