summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2016-06-24 14:06:15 -0700
committerMark Salyzyn <salyzyn@google.com>2016-06-24 14:34:31 -0700
commitced6078b0e03a75d9b78e61ce25609bd2cb97b1d (patch)
treef93e8f6ee4ebfd58195abd196716be2f48f5ab2d
parentc0ca0ceaa5a41094a23695a0f0511e96b297cdfa (diff)
downloadnative-nougat-dev.tar.gz
dumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSGnougat-dev
(cherry pick from commit 7d0a762ecaf9f4d005f0f6db913034c2e084d362) Bug: 29639467 Change-Id: Iba0b1754eaebfb2b0624dcbef522b7d8456eeb50
-rw-r--r--cmds/dumpstate/dumpstate.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index 5fe1f90939..5c31d6b66d 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -67,6 +67,7 @@ static int control_socket_fd;
static std::string suffix;
#define PSTORE_LAST_KMSG "/sys/fs/pstore/console-ramoops"
+#define ALT_PSTORE_LAST_KMSG "/sys/fs/pstore/console-ramoops-0"
#define RAFT_DIR "/data/misc/raft/"
#define RECOVERY_DIR "/cache/recovery"
@@ -779,6 +780,8 @@ static void dumpstate(const std::string& screenshot_path, const std::string& ver
if (!stat(PSTORE_LAST_KMSG, &st)) {
/* Also TODO: Make console-ramoops CAP_SYSLOG protected. */
dump_file("LAST KMSG", PSTORE_LAST_KMSG);
+ } else if (!stat(ALT_PSTORE_LAST_KMSG, &st)) {
+ dump_file("LAST KMSG", ALT_PSTORE_LAST_KMSG);
} else {
/* TODO: Make last_kmsg CAP_SYSLOG protected. b/5555691 */
dump_file("LAST KMSG", "/proc/last_kmsg");