diff options
author | Mark Salyzyn <salyzyn@google.com> | 2016-06-24 14:06:15 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2016-06-24 14:14:10 -0700 |
commit | 7d0a762ecaf9f4d005f0f6db913034c2e084d362 (patch) | |
tree | 77eeef318e81a799b2a0eea08c8cc1818dc9268c | |
parent | c1c06a7d6b72e60969c1ae7f02415b1fb9770fff (diff) | |
download | native-7d0a762ecaf9f4d005f0f6db913034c2e084d362.tar.gz |
dumpstate: Also pick up /sys/fs/pstore/console-ramoops-0 for LAST KMSG
Bug: 29639467
Change-Id: Iba0b1754eaebfb2b0624dcbef522b7d8456eeb50
-rw-r--r-- | cmds/dumpstate/dumpstate.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp index 5b7fda3673..afb12556f4 100644 --- a/cmds/dumpstate/dumpstate.cpp +++ b/cmds/dumpstate/dumpstate.cpp @@ -46,6 +46,7 @@ static const char *dump_traces_path = NULL; static char screenshot_path[PATH_MAX] = ""; #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 TOMBSTONE_DIR "/data/tombstones" @@ -540,6 +541,8 @@ static void dumpstate() { 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"); |