summaryrefslogtreecommitdiffstats
path: root/update_verifier/update_verifier.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-12-08 02:04:58 +0100
committerTao Bao <tbao@google.com>2015-12-08 20:24:35 +0100
commit740e01e2bd5dae3f77191699636a1d6b51f436f0 (patch)
tree1f18a2ee459fc5e13f4a6571c7c545c5947ed10b /update_verifier/update_verifier.cpp
parentAdd update_verifier for A/B OTA update. (diff)
downloadandroid_bootable_recovery-740e01e2bd5dae3f77191699636a1d6b51f436f0.tar
android_bootable_recovery-740e01e2bd5dae3f77191699636a1d6b51f436f0.tar.gz
android_bootable_recovery-740e01e2bd5dae3f77191699636a1d6b51f436f0.tar.bz2
android_bootable_recovery-740e01e2bd5dae3f77191699636a1d6b51f436f0.tar.lz
android_bootable_recovery-740e01e2bd5dae3f77191699636a1d6b51f436f0.tar.xz
android_bootable_recovery-740e01e2bd5dae3f77191699636a1d6b51f436f0.tar.zst
android_bootable_recovery-740e01e2bd5dae3f77191699636a1d6b51f436f0.zip
Diffstat (limited to 'update_verifier/update_verifier.cpp')
-rw-r--r--update_verifier/update_verifier.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/update_verifier/update_verifier.cpp b/update_verifier/update_verifier.cpp
index 9ba792b86..5e8881571 100644
--- a/update_verifier/update_verifier.cpp
+++ b/update_verifier/update_verifier.cpp
@@ -32,25 +32,21 @@
* A/B OTA package format in place.
*/
-#include <cutils/klog.h>
#include <string.h>
#include <hardware/boot_control.h>
#define LOG_TAG "update_verifier"
-#define INFO(x...) KLOG_INFO(LOG_TAG, x)
-#define ERROR(x...) KLOG_ERROR(LOG_TAG, x)
+#include <log/log.h>
int main(int argc, char** argv) {
- klog_init();
- klog_set_level(6);
for (int i = 1; i < argc; i++) {
- INFO("Started with arg %d: %s\n", i, argv[i]);
+ SLOGI("Started with arg %d: %s\n", i, argv[i]);
}
const hw_module_t* hw_module;
if (hw_get_module("bootctrl", &hw_module) != 0) {
- ERROR("Error getting bootctrl module.\n");
+ SLOGE("Error getting bootctrl module.\n");
return -1;
}
@@ -60,7 +56,7 @@ int main(int argc, char** argv) {
unsigned current_slot = module->getCurrentSlot(module);
int bootable = module->isSlotBootable(module, current_slot);
- INFO("Booting slot %u: isSlotBootable=%d\n", current_slot, bootable);
+ SLOGI("Booting slot %u: isSlotBootable=%d\n", current_slot, bootable);
if (bootable == 0) {
// The current slot has not booted successfully.
@@ -73,12 +69,12 @@ int main(int argc, char** argv) {
int ret = module->markBootSuccessful(module);
if (ret != 0) {
- ERROR("Error marking booted successfully: %s\n", strerror(-ret));
+ SLOGE("Error marking booted successfully: %s\n", strerror(-ret));
return -1;
}
- INFO("Marked slot %u as booted successfully.\n", current_slot);
+ SLOGI("Marked slot %u as booted successfully.\n", current_slot);
}
- INFO("Leaving update_verifier.\n");
+ SLOGI("Leaving update_verifier.\n");
return 0;
}