Attention is currently required from: Edward O'Callaghan, Anastasia Klimchuk, Peter Marheine. Daniel Campello has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/59532 )
Change subject: [FIX ME] tests: Add test for extract operation ......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS1:
But the reference patch already exists (CB:52362), why would I duplicate a chunk of it in another pa […]
I disagree... read_flash_to_file is still writing to files (via write_buf_to_include_args) when filename is NULL. If you read the function it is reading first the contents of flash into a memory buffer and then using that buffer to write to the files specified in the include args (which respect the layout portions) and then (with the proposed modification) optionally writing the whole buffer (with empty bytes where the layout does not have a defined region) to the specified filename.
Just calling write_buf_to_include_args would not make sense without first reading from flash to memory buffer
With respect of CB:52362 the CL introduces a change on the CLI interface, and that can be treated separately than the implementation of the extract method (which has a bug without the "if (filename)" in read_flash_to_file. Adding this should not affect in any way the existing requirement of a filename for the other options (-r/-w/-v) which is enforced at higher levels in the stack regardless.