From 7ebd578100e6526ef46c98cb9978d692160d8179 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Sat, 15 Jun 2019 15:44:39 +0200 Subject: layout: Add `capacity` field Use it to keep track of the size of the `entries` array. An interim solution until we have dynamic allocation. Change-Id: Ib5f431bc0a72a79a53fa1376c3417942b19dd3a0 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/c/flashrom/+/33516 Reviewed-by: Angel Pons Reviewed-by: Anastasia Klimchuk Reviewed-by: Peter Marheine Reviewed-by: Edward O'Callaghan Tested-by: build bot (Jenkins) --- flashrom.c | 1 + 1 file changed, 1 insertion(+) (limited to 'flashrom.c') diff --git a/flashrom.c b/flashrom.c index 90e18643..8d260cb8 100644 --- a/flashrom.c +++ b/flashrom.c @@ -825,6 +825,7 @@ notfound: /* Fill fallback layout covering the whole chip. */ struct single_layout *const fallback = &flash->fallback_layout; fallback->base.entries = &fallback->entry; + fallback->base.capacity = 1; fallback->base.num_entries = 1; fallback->entry.start = 0; fallback->entry.end = flash->chip->total_size * 1024 - 1; -- cgit v1.2.3