mirror of
https://review.coreboot.org/flashrom.git
synced 2025-06-30 21:52:36 +02:00
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>
This commit is contained in:

committed by
Edward O'Callaghan

parent
00b8e85528
commit
f31bb81de1
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user