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 <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/31247
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/flash.h b/flash.h
index 911214c..5bbfa0a 100644
--- a/flash.h
+++ b/flash.h
@@ -391,10 +391,10 @@
#define msg_cspew(...) print(FLASHROM_MSG_SPEW, __VA_ARGS__) /* chip debug spew */
/* layout.c */
-int register_include_arg(char *name);
+int register_include_arg(struct layout_include_args **args, char *name);
int read_romlayout(const char *name);
int normalize_romentries(const struct flashctx *flash);
-void layout_cleanup(void);
+void layout_cleanup(struct layout_include_args **args);
/* spi.c */
struct spi_command {