summaryrefslogtreecommitdiffstats
path: root/fs/pstore/inode.c
diff options
context:
space:
mode:
authorAnton Vorontsov <anton.vorontsov@linaro.org>2012-05-26 15:20:19 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-14 01:59:27 +0200
commitf29e5956aebafe63f81e80f972c44c4a666e5c7f (patch)
tree16b1c8c095f8a1d0d12bd2e6cb66e29ab4c1e516 /fs/pstore/inode.c
parentMerge branch 'staging-linus' into staging-next (diff)
downloadlinux-f29e5956aebafe63f81e80f972c44c4a666e5c7f.tar.xz
linux-f29e5956aebafe63f81e80f972c44c4a666e5c7f.zip
pstore: Add console log messages support
Pstore doesn't support logging kernel messages in run-time, it only dumps dmesg when kernel oopses/panics. This makes pstore useless for debugging hangs caused by HW issues or improper use of HW (e.g. weird device inserted -> driver tried to write a reserved bits -> SoC hanged. In that case we don't get any messages in the pstore. Therefore, let's add a runtime logging support: PSTORE_TYPE_CONSOLE. Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org> Acked-by: Kees Cook <keescook@chromium.org> Acked-by: Colin Cross <ccross@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/pstore/inode.c')
-rw-r--r--fs/pstore/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index 11a2aa2a56c4..45bff5441b04 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -212,6 +212,9 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id,
case PSTORE_TYPE_DMESG:
sprintf(name, "dmesg-%s-%lld", psname, id);
break;
+ case PSTORE_TYPE_CONSOLE:
+ sprintf(name, "console-%s", psname);
+ break;
case PSTORE_TYPE_MCE:
sprintf(name, "mce-%s-%lld", psname, id);
break;