summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2016-04-05 16:41:31 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-04-05 16:41:31 +0200
commitaf1cc8c3278966ffece3521a5a15ef6f76304e9d (patch)
treef1cb4b7d364ff875cd3cb8be3cbed57a8bd14931
parentImport translations. DO NOT MERGE am: f75b6e4 -s ours (diff)
parentMerge "recovery-persist: pick up both pstore console files" am: 901f315 (diff)
downloadandroid_bootable_recovery-af1cc8c3278966ffece3521a5a15ef6f76304e9d.tar
android_bootable_recovery-af1cc8c3278966ffece3521a5a15ef6f76304e9d.tar.gz
android_bootable_recovery-af1cc8c3278966ffece3521a5a15ef6f76304e9d.tar.bz2
android_bootable_recovery-af1cc8c3278966ffece3521a5a15ef6f76304e9d.tar.lz
android_bootable_recovery-af1cc8c3278966ffece3521a5a15ef6f76304e9d.tar.xz
android_bootable_recovery-af1cc8c3278966ffece3521a5a15ef6f76304e9d.tar.zst
android_bootable_recovery-af1cc8c3278966ffece3521a5a15ef6f76304e9d.zip
Diffstat (limited to '')
-rw-r--r--recovery-persist.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/recovery-persist.cpp b/recovery-persist.cpp
index 8587e9a66..25df03f47 100644
--- a/recovery-persist.cpp
+++ b/recovery-persist.cpp
@@ -50,6 +50,7 @@ static const char *LAST_LOG_FILE = "/data/misc/recovery/last_log";
static const char *LAST_PMSG_FILE = "/sys/fs/pstore/pmsg-ramoops-0";
static const char *LAST_KMSG_FILE = "/data/misc/recovery/last_kmsg";
static const char *LAST_CONSOLE_FILE = "/sys/fs/pstore/console-ramoops-0";
+static const char *ALT_LAST_CONSOLE_FILE = "/sys/fs/pstore/console-ramoops";
static const int KEEP_LOG_COUNT = 10;
@@ -192,8 +193,12 @@ int main(int argc, char **argv) {
LOG_ID_SYSTEM, ANDROID_LOG_INFO, "recovery/", logsave, NULL);
/* Is there a last console log too? */
- if (rotated && !access(LAST_CONSOLE_FILE, R_OK)) {
- copy_file(LAST_CONSOLE_FILE, LAST_KMSG_FILE);
+ if (rotated) {
+ if (!access(LAST_CONSOLE_FILE, R_OK)) {
+ copy_file(LAST_CONSOLE_FILE, LAST_KMSG_FILE);
+ } else if (!access(ALT_LAST_CONSOLE_FILE, R_OK)) {
+ copy_file(ALT_LAST_CONSOLE_FILE, LAST_KMSG_FILE);
+ }
}
return 0;