diff options
author | Mark Salyzyn | 2016-04-04 18:19:26 -0500 |
---|---|---|
committer | Mark Salyzyn | 2016-04-04 18:24:48 -0500 |
commit | 5f7111ff4dc5055298d302b228f392a7a22a00a0 (patch) | |
tree | 0b0fd25e6deefb0ecb40c52bde528a4847c0fb0e | |
parent | 81247500d535dac714fad657860b67474e1f6e42 (diff) | |
download | platform-bootable-recovery-5f7111ff4dc5055298d302b228f392a7a22a00a0.tar.gz platform-bootable-recovery-5f7111ff4dc5055298d302b228f392a7a22a00a0.tar.xz platform-bootable-recovery-5f7111ff4dc5055298d302b228f392a7a22a00a0.zip |
recovery-persist: pick up both pstore console files
- Volantis console-ramoops-0 (upstream correct)
- Angler console-ramoops
- Bullhead console-ramoops
- Shamu console-ramoops
NB: Shamu also has kernel crashes in other pstore files,
not merging them in.
Bug: 27176738
Change-Id: Ib6eef3e25475935b89252f51c960719c7860511a
-rw-r--r-- | recovery-persist.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/recovery-persist.cpp b/recovery-persist.cpp index 8587e9a6..25df03f4 100644 --- a/recovery-persist.cpp +++ b/recovery-persist.cpp | |||
@@ -50,6 +50,7 @@ static const char *LAST_LOG_FILE = "/data/misc/recovery/last_log"; | |||
50 | static const char *LAST_PMSG_FILE = "/sys/fs/pstore/pmsg-ramoops-0"; | 50 | static const char *LAST_PMSG_FILE = "/sys/fs/pstore/pmsg-ramoops-0"; |
51 | static const char *LAST_KMSG_FILE = "/data/misc/recovery/last_kmsg"; | 51 | static const char *LAST_KMSG_FILE = "/data/misc/recovery/last_kmsg"; |
52 | static const char *LAST_CONSOLE_FILE = "/sys/fs/pstore/console-ramoops-0"; | 52 | static const char *LAST_CONSOLE_FILE = "/sys/fs/pstore/console-ramoops-0"; |
53 | static const char *ALT_LAST_CONSOLE_FILE = "/sys/fs/pstore/console-ramoops"; | ||
53 | 54 | ||
54 | static const int KEEP_LOG_COUNT = 10; | 55 | static const int KEEP_LOG_COUNT = 10; |
55 | 56 | ||
@@ -192,8 +193,12 @@ int main(int argc, char **argv) { | |||
192 | LOG_ID_SYSTEM, ANDROID_LOG_INFO, "recovery/", logsave, NULL); | 193 | LOG_ID_SYSTEM, ANDROID_LOG_INFO, "recovery/", logsave, NULL); |
193 | 194 | ||
194 | /* Is there a last console log too? */ | 195 | /* Is there a last console log too? */ |
195 | if (rotated && !access(LAST_CONSOLE_FILE, R_OK)) { | 196 | if (rotated) { |
196 | copy_file(LAST_CONSOLE_FILE, LAST_KMSG_FILE); | 197 | if (!access(LAST_CONSOLE_FILE, R_OK)) { |
198 | copy_file(LAST_CONSOLE_FILE, LAST_KMSG_FILE); | ||
199 | } else if (!access(ALT_LAST_CONSOLE_FILE, R_OK)) { | ||
200 | copy_file(ALT_LAST_CONSOLE_FILE, LAST_KMSG_FILE); | ||
201 | } | ||
197 | } | 202 | } |
198 | 203 | ||
199 | return 0; | 204 | return 0; |