android: logger: Add new system log for framework/system log messages
authorSan Mehat <san@google.com>
Wed, 24 Feb 2010 00:09:47 +0000 (16:09 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 30 Nov 2011 11:40:06 +0000 (20:40 +0900)
Signed-off-by: San Mehat <san@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/android/logger.c
drivers/staging/android/logger.h

index dd765649c03de3c08183c4021a1349992c611081..531bdbeede89f8d6a66236ffbfb410ce6e87cd96 100644 (file)
@@ -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;
 }
index a562434d74190f015317e2571ccedb80d5139304..2cb06e9d8f9821ea6aa98b63d2a79b4e3b171578 100644 (file)
@@ -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)