diff options
author | Nico Huber <nico.h@gmx.de> | 2019-06-15 21:41:21 +0200 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-06-26 15:57:06 +0000 |
commit | 953c5ad440588e4bb5325efb10fa67e43ae7b782 (patch) | |
tree | 85d15bc51e2c38a2eadbd1d0d3807b263ebec369 /libflashrom.c | |
parent | a1afc84156fdd1efce124a9f1441058db10d02ff (diff) | |
download | flashrom-953c5ad440588e4bb5325efb10fa67e43ae7b782.tar.gz flashrom-953c5ad440588e4bb5325efb10fa67e43ae7b782.tar.bz2 flashrom-953c5ad440588e4bb5325efb10fa67e43ae7b782.zip |
layout: Use linked list for `struct romentry`
This gets rid of the entry limit and hopefully makes future layout
handling easier. We start by making `struct flashrom_layout` private
to `layout.c`.
Change-Id: I60a0aa1007ebcd5eb401db116f835d129b3e9732
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33521
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'libflashrom.c')
-rw-r--r-- | libflashrom.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/libflashrom.c b/libflashrom.c index dd5cb002e..cb0d47026 100644 --- a/libflashrom.c +++ b/libflashrom.c @@ -505,11 +505,6 @@ static int flashrom_layout_parse_fmap(struct flashrom_layout **layout, if (!fmap || !l) return 1; - if (l->num_entries + fmap->nareas > l->capacity) { - msg_gerr("Cannot add fmap entries to layout - Too many entries.\n"); - return 1; - } - for (i = 0, area = fmap->areas; i < fmap->nareas; i++, area++) { snprintf(name, sizeof(name), "%s", area->name); if (flashrom_layout_add_region(l, area->offset, area->offset + area->size - 1, name)) |