aboutsummaryrefslogtreecommitdiffstats
path: root/cli_classic.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2022-08-11 22:02:26 +1000
committerEdward O'Callaghan <quasisec@chromium.org>2022-08-25 00:21:22 +0000
commitac7f0c20b816784fca6b21e2a931f55b4089e219 (patch)
treedbf5f7c9a27c2b8ed525e99e12f6c37faf64cf77 /cli_classic.c
parent75b745544191b7c27db24563f54b64a0b6fdbf31 (diff)
downloadflashrom-ac7f0c20b816784fca6b21e2a931f55b4089e219.tar.gz
flashrom-ac7f0c20b816784fca6b21e2a931f55b4089e219.tar.bz2
flashrom-ac7f0c20b816784fca6b21e2a931f55b4089e219.zip
flashrom.c: flatten out read_buf_from_include_args()
read_buf_from_include_args() does not need the whole flashctx, rather it works with a fix layout and buffer. Just pass what state is actually required. BUG=b:242246291 TEST=builds Change-Id: Ieadd68895c7ba05cc3d770d304351b02622f14d7 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66633 Reviewed-by: Evan Benn <evanbenn@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-by: Sam McNally <sammc@google.com> Reviewed-by: Thomas Heijligen <src@posteo.de>
Diffstat (limited to 'cli_classic.c')
-rw-r--r--cli_classic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli_classic.c b/cli_classic.c
index 991804d1..d0712926 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -411,7 +411,7 @@ static int do_write(struct flashctx *const flash, const char *const filename, co
* ... then update newcontents with contents from files provided to '-i'
* args if needed.
*/
- if (read_buf_from_include_args(flash, newcontents))
+ if (read_buf_from_include_args(get_layout(flash), newcontents))
goto _free_ret;
if (referencefile) {
@@ -445,7 +445,7 @@ static int do_verify(struct flashctx *const flash, const char *const filename)
* ... then update newcontents with contents from files provided to '-i'
* args if needed.
*/
- if (read_buf_from_include_args(flash, newcontents))
+ if (read_buf_from_include_args(get_layout(flash), newcontents))
goto _free_ret;
ret = flashrom_image_verify(flash, newcontents, flash_size);