Attention is currently required from: Angel Pons, Anastasia Klimchuk, Nikolai Artemiev. Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/62554 )
Change subject: layout: Change signature for prepare_layout_for_extraction ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2: I'm not sure if I mentioned this somewhere already, the topic seems familiar. I kind of see this extract feature as CLI code. So one completely different solution would be to add an API to enumerate the regions of a layout, then in the CLI walk the regions and read each indvidually and save them to files.
If we want to keep the current code, I suggest to add the new API in a separate header file, maybe even a separate library. So far, we have kept libflashrom free from file i/o and some target environments just don't support it. If we change that, careful separation could spare us some `#if` churn.