summaryrefslogtreecommitdiffstats
path: root/cli_classic.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2022-01-07 11:25:07 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2022-01-11 22:53:44 +0000
commitf31bb81de166a408b562296dc7f772421ecd4e2d (patch)
treed2fe7647082ffb5dbabaf309d44a755f7b0ac5d2 /cli_classic.c
parent00b8e8552876a9d050c9f73e853a84965452ba40 (diff)
downloadflashrom-f31bb81de166a408b562296dc7f772421ecd4e2d.tar.gz
flashrom-f31bb81de166a408b562296dc7f772421ecd4e2d.tar.bz2
flashrom-f31bb81de166a408b562296dc7f772421ecd4e2d.zip
layout: Hoist get_region_range() into libflashrom API
While using the libflashrom API to read specific regions there is no currently no general way to find the offset into the read buffer of the expected region. flashrom_layout_include_region() probably should have returned the region offset and size if it was included. However to avoid a change in API signature we can instead hoist up get_region_range() into the API to be called after. BUG=b:207808292 TEST=`make` && tested in porting cbfstool use-case. Change-Id: I8cf95b5eaec943a51d0ea668f26a56bf6d6b4446 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/60881 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Sam McNally <sammc@google.com>
Diffstat (limited to 'cli_classic.c')
-rw-r--r--cli_classic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli_classic.c b/cli_classic.c
index d69b7985f..1b9c5ba3a 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -782,7 +782,7 @@ int main(int argc, char *argv[])
}
if (set_wp_region && wp_region) {
- if (get_region_range(layout, wp_region, &wp_start, &wp_len)) {
+ if (flashrom_layout_get_region_range(layout, wp_region, &wp_start, &wp_len)) {
ret = 1;
goto out_release;
}