From ce983bccaab450d358854494f15c2d8a1846d56b Mon Sep 17 00:00:00 2001 From: Daniel Campello Date: Fri, 16 Apr 2021 15:26:42 -0600 Subject: cli_classic.c: add -x option for do_extract() This change introduces a new option to extract all layout regions to files with the name of each region (or with the provided filename via -i region:file). It is implemented by mutating the flash layout to include all regions and backfilling the entry->file with entry->name (replacing spaces with underscores) Signed-off-by: Daniel Campello Change-Id: I8c69223fa92cf5b50abe070f1ab9f19d3b42f6ff Reviewed-on: https://review.coreboot.org/c/flashrom/+/52450 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- layout.h | 1 + 1 file changed, 1 insertion(+) (limited to 'layout.h') diff --git a/layout.h b/layout.h index b11c4325..327f5bf8 100644 --- a/layout.h +++ b/layout.h @@ -69,5 +69,6 @@ int process_include_args(struct flashrom_layout *l, const struct layout_include_ const struct romentry *layout_next_included_region(const struct flashrom_layout *, chipoff_t); const struct romentry *layout_next_included(const struct flashrom_layout *, const struct romentry *); int included_regions_overlap(const struct flashrom_layout *const flashrom_layout); +void prepare_layout_for_extraction(struct flashrom_flashctx *flash); #endif /* !__LAYOUT_H__ */ -- cgit v1.2.3