repart: Add roothash to output of all verity siblings

This can be used to match verity partitions together using the repart
JSON output.
This commit is contained in:
Daan De Meyer
2023-01-25 19:50:44 +00:00
committed by Luca Boccassi
parent 37aabb488e
commit 2ecc7a5bca
2 changed files with 13 additions and 6 deletions
+4 -2
View File
@@ -2471,8 +2471,10 @@ static int context_dump_partitions(Context *context) {
if (p->new_padding != UINT64_MAX)
sum_padding += p->new_padding;
if (p->verity == VERITY_HASH) {
rh = p->roothash ? hexmem(p->roothash, p->roothash_size) : strdup("TBD");
if (p->verity != VERITY_OFF) {
Partition *hp = p->verity == VERITY_HASH ? p : p->siblings[VERITY_HASH];
rh = hp->roothash ? hexmem(hp->roothash, hp->roothash_size) : strdup("TBD");
if (!rh)
return log_oom();
}