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 /layout.h | |
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 'layout.h')
-rw-r--r-- | layout.h | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -36,6 +36,8 @@ typedef uint32_t chipsize_t; /* Able to store the number of bytes of any support #define MAX_ROMLAYOUT 128 struct romentry { + struct romentry *next; + chipoff_t start; chipoff_t end; bool included; @@ -43,14 +45,7 @@ struct romentry { char *file; }; -struct flashrom_layout { - /* entries store the entries specified in a layout file and associated run-time data */ - struct romentry *entries; - /* the maximum number of entries */ - size_t capacity; - /* the number of successfully parsed entries */ - size_t num_entries; -}; +struct flashrom_layout; struct layout_include_args { char *name; |