aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao2016-10-13 18:04:07 -0500
committerTao Bao2016-10-13 18:07:15 -0500
commitee9b95544a7af548e98f2b7a080e2eb7abaaf981 (patch)
treece8d6b05ae34ac8b4102e7907b5d01f7b762fe30 /install.cpp
parentc5b4b719134a1d2d3b06a81f92a00b24e527248d (diff)
downloadplatform-bootable-recovery-ee9b95544a7af548e98f2b7a080e2eb7abaaf981.tar.gz
platform-bootable-recovery-ee9b95544a7af548e98f2b7a080e2eb7abaaf981.tar.xz
platform-bootable-recovery-ee9b95544a7af548e98f2b7a080e2eb7abaaf981.zip
Fix the prefix matching for uncrypt status.
Also change its logging statement from PLOG to LOG, since android::base::StartsWith() doesn't set errno. Test: Build and reboot into recovery image. Check last_log. Change-Id: I55ac7eec24228db76a13580958b4a4330b06cf57
Diffstat (limited to 'install.cpp')
-rw-r--r--install.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/install.cpp b/install.cpp
index 427bea1a..72c922d5 100644
--- a/install.cpp
+++ b/install.cpp
@@ -377,8 +377,8 @@ install_package(const char* path, bool* wipe_cache, const char* install_file,
377 std::string uncrypt_status; 377 std::string uncrypt_status;
378 if (!android::base::ReadFileToString(UNCRYPT_STATUS, &uncrypt_status)) { 378 if (!android::base::ReadFileToString(UNCRYPT_STATUS, &uncrypt_status)) {
379 PLOG(WARNING) << "failed to read uncrypt status"; 379 PLOG(WARNING) << "failed to read uncrypt status";
380 } else if (!android::base::StartsWith(uncrypt_status, "uncrypt_:")) { 380 } else if (!android::base::StartsWith(uncrypt_status, "uncrypt_")) {
381 PLOG(WARNING) << "corrupted uncrypt_status: " << uncrypt_status; 381 LOG(WARNING) << "corrupted uncrypt_status: " << uncrypt_status;
382 } else { 382 } else {
383 log_buffer.push_back(android::base::Trim(uncrypt_status)); 383 log_buffer.push_back(android::base::Trim(uncrypt_status));
384 } 384 }