From f31bb81de166a408b562296dc7f772421ecd4e2d Mon Sep 17 00:00:00 2001 From: Edward O'Callaghan Date: Fri, 7 Jan 2022 11:25:07 +1100 Subject: 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 Reviewed-on: https://review.coreboot.org/c/flashrom/+/60881 Tested-by: build bot (Jenkins) Reviewed-by: Sam McNally --- layout.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'layout.h') diff --git a/layout.h b/layout.h index 713241f61..abbdc22c1 100644 --- a/layout.h +++ b/layout.h @@ -59,8 +59,6 @@ int register_include_arg(struct layout_include_args **, const char *arg); int process_include_args(struct flashrom_layout *, const struct layout_include_args *); void cleanup_include_args(struct layout_include_args **); -int get_region_range(struct flashrom_layout *, const char *name, - unsigned int *start, unsigned int *len); const struct romentry *layout_next_included_region(const struct flashrom_layout *, chipoff_t); const struct romentry *layout_next_included(const struct flashrom_layout *, const struct romentry *); const struct romentry *layout_next(const struct flashrom_layout *, const struct romentry *); -- cgit v1.2.3