summaryrefslogtreecommitdiffstats
path: root/update_verifier/update_verifier.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-08-06 03:00:04 +0200
committerTianjie Xu <xunchang@google.com>2016-09-01 20:33:25 +0200
commit7b0ad9c638176dc364dabb65b363536055a0ea9c (patch)
tree73848b33067169c72788f517063c3d9659e783c0 /update_verifier/update_verifier.cpp
parentMerge "minadbd: rename adb_server_main to minadbd_main." (diff)
downloadandroid_bootable_recovery-7b0ad9c638176dc364dabb65b363536055a0ea9c.tar
android_bootable_recovery-7b0ad9c638176dc364dabb65b363536055a0ea9c.tar.gz
android_bootable_recovery-7b0ad9c638176dc364dabb65b363536055a0ea9c.tar.bz2
android_bootable_recovery-7b0ad9c638176dc364dabb65b363536055a0ea9c.tar.lz
android_bootable_recovery-7b0ad9c638176dc364dabb65b363536055a0ea9c.tar.xz
android_bootable_recovery-7b0ad9c638176dc364dabb65b363536055a0ea9c.tar.zst
android_bootable_recovery-7b0ad9c638176dc364dabb65b363536055a0ea9c.zip
Diffstat (limited to 'update_verifier/update_verifier.cpp')
-rw-r--r--update_verifier/update_verifier.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/update_verifier/update_verifier.cpp b/update_verifier/update_verifier.cpp
index be70cec7f..0a040c564 100644
--- a/update_verifier/update_verifier.cpp
+++ b/update_verifier/update_verifier.cpp
@@ -35,19 +35,17 @@
#include <string.h>
+#include <android-base/logging.h>
#include <hardware/boot_control.h>
-#define LOG_TAG "update_verifier"
-#include <log/log.h>
-
int main(int argc, char** argv) {
for (int i = 1; i < argc; i++) {
- SLOGI("Started with arg %d: %s\n", i, argv[i]);
+ LOG(INFO) << "Started with arg " << i << ": " << argv[i];
}
const hw_module_t* hw_module;
if (hw_get_module("bootctrl", &hw_module) != 0) {
- SLOGE("Error getting bootctrl module.\n");
+ LOG(ERROR) << "Error getting bootctrl module.";
return -1;
}
@@ -57,7 +55,7 @@ int main(int argc, char** argv) {
unsigned current_slot = module->getCurrentSlot(module);
int is_successful= module->isSlotMarkedSuccessful(module, current_slot);
- SLOGI("Booting slot %u: isSlotMarkedSuccessful=%d\n", current_slot, is_successful);
+ LOG(INFO) << "Booting slot " << current_slot << ": isSlotMarkedSuccessful=" << is_successful;
if (is_successful == 0) {
// The current slot has not booted successfully.
@@ -70,12 +68,12 @@ int main(int argc, char** argv) {
int ret = module->markBootSuccessful(module);
if (ret != 0) {
- SLOGE("Error marking booted successfully: %s\n", strerror(-ret));
+ LOG(ERROR) << "Error marking booted successfully: " << strerror(-ret);
return -1;
}
- SLOGI("Marked slot %u as booted successfully.\n", current_slot);
+ LOG(INFO) << "Marked slot " << current_slot << " as booted successfully.";
}
- SLOGI("Leaving update_verifier.\n");
+ LOG(INFO) << "Leaving update_verifier.";
return 0;
}