summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-12-11 06:02:56 +0100
committerandroid-build-merger <android-build-merger@google.com>2015-12-11 06:02:56 +0100
commit3af5e554af67925c54cf030e77d1d7cf333bc949 (patch)
tree83b4fc3918614f8b50b6b67b50e42a747c507ab7
parentMerge "uncrypt: Suppress the compiler warnings on LP64." am: ca18526760 (diff)
parentMerge "update_verifier: Track the API change for isSlotBootable()." (diff)
downloadandroid_bootable_recovery-3af5e554af67925c54cf030e77d1d7cf333bc949.tar
android_bootable_recovery-3af5e554af67925c54cf030e77d1d7cf333bc949.tar.gz
android_bootable_recovery-3af5e554af67925c54cf030e77d1d7cf333bc949.tar.bz2
android_bootable_recovery-3af5e554af67925c54cf030e77d1d7cf333bc949.tar.lz
android_bootable_recovery-3af5e554af67925c54cf030e77d1d7cf333bc949.tar.xz
android_bootable_recovery-3af5e554af67925c54cf030e77d1d7cf333bc949.tar.zst
android_bootable_recovery-3af5e554af67925c54cf030e77d1d7cf333bc949.zip
-rw-r--r--update_verifier/update_verifier.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/update_verifier/update_verifier.cpp b/update_verifier/update_verifier.cpp
index 5e8881571..be70cec7f 100644
--- a/update_verifier/update_verifier.cpp
+++ b/update_verifier/update_verifier.cpp
@@ -23,7 +23,8 @@
* verified. dm-verity must be in enforcing mode, so that it will reboot the
* device on dm-verity failures. When that happens, the bootloader should
* mark the slot as unbootable and stops trying. We should never see a device
- * started in dm-verity logging mode but with isSlotBootable equals to 0.
+ * started in dm-verity logging mode but with isSlotMarkedSuccessful equals to
+ * 0.
*
* The current slot will be marked as having booted successfully if the
* verifier reaches the end after the verification.
@@ -55,17 +56,17 @@ int main(int argc, char** argv) {
module->init(module);
unsigned current_slot = module->getCurrentSlot(module);
- int bootable = module->isSlotBootable(module, current_slot);
- SLOGI("Booting slot %u: isSlotBootable=%d\n", current_slot, bootable);
+ int is_successful= module->isSlotMarkedSuccessful(module, current_slot);
+ SLOGI("Booting slot %u: isSlotMarkedSuccessful=%d\n", current_slot, is_successful);
- if (bootable == 0) {
+ if (is_successful == 0) {
// The current slot has not booted successfully.
// TODO: Add the actual verification after we have the A/B OTA package
// format in place.
// TODO: Assert the dm-verity mode. Bootloader should never boot a newly
- // flashed slot (isSlotBootable == 0) with dm-verity logging mode.
+ // flashed slot (isSlotMarkedSuccessful == 0) with dm-verity logging mode.
int ret = module->markBootSuccessful(module);
if (ret != 0) {