summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2023-06-24 01:05:48 +0300
committerTom Rini <trini@konsulko.com>2023-07-17 22:39:55 +0300
commit22cdb3f0f174e926071975cdc5157aa6526b67a7 (patch)
tree4fb76cd71e0b1c8aaddcac6b4715e5610005ba40 /include
parent4837a1dba6f17f21bbb5f32d6e41707ef76b65f8 (diff)
downloadu-boot-22cdb3f0f174e926071975cdc5157aa6526b67a7.tar.xz
android_ab: Add option to skip decrementing tries
It is is sometimes desired to be able to skip decrementing the number of tries remaining in an Android A/B boot, and instead just check which slot will be tried later. This can commonly be be the case for platforms that want to A/B u-boot itself, but are required to boot from a FAT MBR partition. In these cases, u-boot must do an early check that the MBR points to the correct A/B boot partition, and if not rewrite the MBR to point to the correct one and reboot. Decrementing the try count in this case is not desired because it means that each u-boot might constantly ping-pong overwriting the MBR and rebooting until all the retries are used up. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/android_ab.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/android_ab.h b/include/android_ab.h
index 3eb61125c6..1fee7582b9 100644
--- a/include/android_ab.h
+++ b/include/android_ab.h
@@ -30,6 +30,7 @@ struct disk_partition;
* @param[in] part_info Place to store the partition information
* Return: The slot number (>= 0) on success, or a negative on error
*/
-int ab_select_slot(struct blk_desc *dev_desc, struct disk_partition *part_info);
+int ab_select_slot(struct blk_desc *dev_desc, struct disk_partition *part_info,
+ bool dec_tries);
#endif /* __ANDROID_AB_H */