mirror of
https://review.coreboot.org/flashrom.git
synced 2025-09-16 09:55:23 +02:00
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>
This commit is contained in:
11
layout.h
11
layout.h
@@ -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;
|
||||
|
Reference in New Issue
Block a user