Daniel Campello has uploaded this change for review. ( 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. Extract operation reads the layout regions to filenames with equal name to the specified layout regions. 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).
Change-Id: Ibc9a4e2966385863345f06662521d6d0e4685121 --- M flashrom.c 1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/21/59921/1
diff --git a/flashrom.c b/flashrom.c index 48d953b..632bccd 100644 --- a/flashrom.c +++ b/flashrom.c @@ -1100,7 +1100,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");