From 0ebba6132a32eeaf3ff9df2a6c972da2f4e881b9 Mon Sep 17 00:00:00 2001 From: David Pursell Date: Fri, 19 Jan 2024 12:49:22 -0800 Subject: [PATCH] avb_add_hash_footer: fix rollback_index format The --rollback_index value is interpreted as base 10 by default; fix the avb_add_hash_footer rule to print values in base 10 rather than hex. This doesn't affect any current build targets since all usages have rollback_index < 10 at the moment so base 10 and hex are identical. Test: a rollback_index of 12 failed build previously, now succeeds Change-Id: Ib6cafacca02f8792a0bf3a1e733fc89ee16adebb --- filesystem/avb_add_hash_footer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filesystem/avb_add_hash_footer.go b/filesystem/avb_add_hash_footer.go index ead579fc4..469f1fb0a 100644 --- a/filesystem/avb_add_hash_footer.go +++ b/filesystem/avb_add_hash_footer.go @@ -138,7 +138,7 @@ func (a *avbAddHashFooter) GenerateAndroidBuildActions(ctx android.ModuleContext if rollbackIndex < 0 { ctx.PropertyErrorf("rollback_index", "Rollback index must be non-negative") } - cmd.Flag(fmt.Sprintf(" --rollback_index %x", rollbackIndex)) + cmd.Flag(fmt.Sprintf(" --rollback_index %d", rollbackIndex)) } cmd.FlagWithOutput("--image ", a.output)