Attention is currently required from: Edward O'Callaghan, Anastasia Klimchuk. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/61286 )
Change subject: flashrom.c: Move {read,write}_buf_from_include_args() to layout ......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
These two functions are best situated within cli_common once read_flash_to_file() has been eliminate […]
Actually, they are dead code ATM, so I find it hard to reason about intermediate steps.
If I'd write this (per-region file arguments) from scratch, I'd probably go either one of these two ways:
1. Keep everything file related in CLI code. CLI would have to maintain its own mapping from region names to file names (to implement the two functions with the libflashrom API, we'd need a public API to walk the layout entries).
2. Add at set of optional, file-aware libflashrom APIs, e.g. libflashrom_file.[hc]. Something that let's the API user add file names to layout entries and then the two functions that read/write everything from/to files.