aboutsummaryrefslogtreecommitdiffstats
path: root/flashrom.c
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2019-06-15 15:44:39 +0200
committerNico Huber <nico.h@gmx.de>2021-06-26 15:53:31 +0000
commit7ebd578100e6526ef46c98cb9978d692160d8179 (patch)
treef87dc8068f97aa101ae4151dba40a9fd7dc77273 /flashrom.c
parent06a89d713951a2e08ef8fb698a7688357baa83d1 (diff)
downloadflashrom-7ebd578100e6526ef46c98cb9978d692160d8179.tar.gz
flashrom-7ebd578100e6526ef46c98cb9978d692160d8179.tar.bz2
flashrom-7ebd578100e6526ef46c98cb9978d692160d8179.zip
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 <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/flashrom/+/33516 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'flashrom.c')
-rw-r--r--flashrom.c1
1 files changed, 1 insertions, 0 deletions
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;