1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-03 15:03:22 +02:00

layout: Introduce flashrom_layout_new()

It initializes an empty layout. Currently the maximum number of entries
has to be specified, which will vanish once we use dynamic allocation
per entry.

We replace the two special cases `single_layout` and `ich_layout` with
dynamically allocated layouts. As a result, we have to take care to
release the `default_layout` in a flashctx once we are done with it.

Change-Id: I2ae7246493ff592e631cce924777925c7825e398
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33543
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:
Nico Huber
2019-06-16 19:46:46 +02:00
parent f394fcec0d
commit c32c8dc8af
9 changed files with 58 additions and 42 deletions

View File

@ -52,11 +52,6 @@ struct flashrom_layout {
size_t num_entries;
};
struct single_layout {
struct flashrom_layout base;
struct romentry entry;
};
struct layout_include_args {
char *name;
char *file;