Edward O'Callaghan has submitted this change. ( https://review.coreboot.org/c/flashrom/+/59921 )
Change subject: flashrom.c: extract operation only uses layout files ......................................................................
flashrom.c: extract operation only uses layout files
This change fixes a bug on handling the extract operation. The extract operation reads out the layout regions to filenames corresponding to the respective layout region names. read_flash_to_file() does this work via write_buf_to_include_args(). This change makes the call to write_buf_to_file() optional as it is still required for -r (read operation) but not for -x (extract operation).
BUG=b:209512852 TEST=flashrom -x
Fixes: commit ce983bccaab450d358854494f15c2d8a1846d56b Change-Id: Ibc9a4e2966385863345f06662521d6d0e4685121 Signed-off-by: Daniel Campello campello@chromium.org Reviewed-on: https://review.coreboot.org/c/flashrom/+/59921 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Edward O'Callaghan quasisec@chromium.org --- M flashrom.c 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Edward O'Callaghan: Looks good to me, approved
diff --git a/flashrom.c b/flashrom.c index bd34676..dd443b9 100644 --- a/flashrom.c +++ b/flashrom.c @@ -1098,7 +1098,8 @@ goto out_free; }
- ret = write_buf_to_file(buf, size, filename); + if (filename) + ret = write_buf_to_file(buf, size, filename); out_free: free(buf); msg_cinfo("%s.\n", ret ? "FAILED" : "done");
5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.