summaryrefslogtreecommitdiff
path: root/drivers/staging/android
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2010-02-23 16:09:47 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-30 20:40:06 +0900
commit3537cdaa16205d2af7e1195276c786f22bada574 (patch)
treebfd38d95c4b2ab77fe01e2a897da6773d12c1e19 /drivers/staging/android
parent0445f1548fc66a72f3b91cdbe8f26b120245efd1 (diff)
android: logger: Add new system log for framework/system log messages
Signed-off-by: San Mehat <san@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/android')
-rw-r--r--drivers/staging/android/logger.c7
-rw-r--r--drivers/staging/android/logger.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/staging/android/logger.c b/drivers/staging/android/logger.c
index dd765649c03d..531bdbeede89 100644
--- a/drivers/staging/android/logger.c
+++ b/drivers/staging/android/logger.c
@@ -558,6 +558,7 @@ static struct logger_log VAR = { \
DEFINE_LOGGER_DEVICE(log_main, LOGGER_LOG_MAIN, 64*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_system, LOGGER_LOG_SYSTEM, 64*1024)
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;
if (log_radio.misc.minor == minor)
return &log_radio;
+ if (log_system.misc.minor == minor)
+ return &log_system;
return NULL;
}
@@ -603,6 +606,10 @@ static int __init logger_init(void)
if (unlikely(ret))
goto out;
+ ret = init_log(&log_system);
+ if (unlikely(ret))
+ goto out;
+
out:
return ret;
}
diff --git a/drivers/staging/android/logger.h b/drivers/staging/android/logger.h
index a562434d7419..2cb06e9d8f98 100644
--- a/drivers/staging/android/logger.h
+++ b/drivers/staging/android/logger.h
@@ -32,6 +32,7 @@ struct logger_entry {
#define LOGGER_LOG_RADIO "log_radio" /* radio-related messages */
#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_ENTRY_MAX_LEN (4*1024)