From b04fef91c100d815265bc1948e61a62f284c42ef Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Tue, 5 Feb 2019 17:35:05 +0100 Subject: layout.c: Don't use global variables for included regions This removes the use of global variables for included region arguments and also uses a linked list to store the arguments. Change-Id: I6534cc58b8dcc6256c2730c809286d8083669a6c Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/flashrom/+/31247 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- layout.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'layout.h') diff --git a/layout.h b/layout.h index 5c0740756..0f07e09fb 100644 --- a/layout.h +++ b/layout.h @@ -54,11 +54,16 @@ struct single_layout { struct romentry entry; }; +struct layout_include_args { + char *name; + struct layout_include_args *next; +}; + struct flashrom_layout *get_global_layout(void); struct flashrom_flashctx; const struct flashrom_layout *get_layout(const struct flashrom_flashctx *const flashctx); -int process_include_args(struct flashrom_layout *); +int process_include_args(struct flashrom_layout *l, const struct layout_include_args *const args); const struct romentry *layout_next_included_region(const struct flashrom_layout *, chipoff_t); #endif /* !__LAYOUT_H__ */ -- cgit v1.2.3