diff options
author | San Mehat <san@google.com> | 2009-09-17 14:27:41 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:38:13 -0800 |
commit | f25cb596735688051f2c9c9912d82f422fa09771 (patch) | |
tree | 33589994e641c783fcd87849ff0121838ad49a21 /drivers | |
parent | 264b19d57c7466166b926f22d31d599b19a3ab35 (diff) |
ramconsole/apanic: Ensure ramconsole does not get cluttered by apanic threads
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/apanic.c | 4 | ||||
-rw-r--r-- | drivers/staging/android/ram_console.c | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/misc/apanic.c b/drivers/misc/apanic.c index fde087122473..2f858be7ef59 100644 --- a/drivers/misc/apanic.c +++ b/drivers/misc/apanic.c @@ -38,6 +38,8 @@ #include <linux/workqueue.h> #include <linux/preempt.h> +extern void ram_console_enable_console(int); + struct panic_header { u32 magic; #define PANIC_MAGIC 0xdeadf00d @@ -468,6 +470,8 @@ static int apanic(struct notifier_block *this, unsigned long event, if (!threads_offset) threads_offset = ctx->mtd->writesize; + ram_console_enable_console(0); + log_buf_clear(); show_state_filter(0); threads_len = apanic_write_console(ctx->mtd, threads_offset); diff --git a/drivers/staging/android/ram_console.c b/drivers/staging/android/ram_console.c index 8f18a59744cd..d735be45f162 100644 --- a/drivers/staging/android/ram_console.c +++ b/drivers/staging/android/ram_console.c @@ -146,6 +146,14 @@ static struct console ram_console = { .index = -1, }; +void ram_console_enable_console(int enabled) +{ + if (enabled) + ram_console.flags |= CON_ENABLED; + else + ram_console.flags &= ~CON_ENABLED; +} + static void __init ram_console_save_old(struct ram_console_buffer *buffer, char *dest) { |