From 66655b74236eb01ac0fd21ee11b5082ea720ed6b Mon Sep 17 00:00:00 2001 From: Nikolai Artemiev Date: Wed, 7 Dec 2022 11:16:06 +1100 Subject: layout: Factor out flash_region structure from romentry The romentry structure is the container ADT with some annotated meta-data such as 'included' or 'file' however the substantive substructure is a 'flash_region'. Therefore factor this out. That is to say, the link list node 'romentry' is obscured by the implementation details of its use-case of 'flash_region' that we clear up here. BUG=b:260440773 BRANCH=none TEST=flashrom_tester Change-Id: I768742b73db901df5b5208fcbcb8a324a06014c2 CoAuthored-by: Nikolai Artemiev Signed-off-by: Nikolai Artemiev Signed-off-by: Edward O'Callaghan Reviewed-on: https://review.coreboot.org/c/flashrom/+/69196 Reviewed-by: Edward O'Callaghan Reviewed-by: Anastasia Klimchuk Tested-by: build bot (Jenkins) --- include/layout.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/layout.h b/include/layout.h index abbdc22c..6959ef74 100644 --- a/include/layout.h +++ b/include/layout.h @@ -35,14 +35,19 @@ typedef uint32_t chipsize_t; /* Able to store the number of bytes of any support #define MAX_ROMLAYOUT 128 +struct flash_region { + char *name; + chipoff_t start; + chipoff_t end; +}; + struct romentry { struct romentry *next; - chipoff_t start; - chipoff_t end; bool included; - char *name; char *file; + + struct flash_region region; }; struct flashrom_layout; -- cgit v1.2.3