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
This commit is contained in:
David Pursell 2024-01-19 12:49:22 -08:00
parent f29b80c51f
commit 0ebba6132a

View file

@ -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)