mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 14:11:15 +02:00
libflashrom: Add layout "exclude" API
Layouts can be expensive to derive (reading from flash), so we might want to reuse a layout for different purposes. Today, it's not possible to undo a flashrom_layout_include_region() operation (to, say, operate on a different region). Add such an API. Change-Id: I7ea3e0674f25e34bf2cfc8f464ae7ca1c1a3fbfd Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/76005 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
This commit is contained in:

committed by
Edward O'Callaghan

parent
91aa2d8526
commit
e08899fcf4
@ -420,6 +420,16 @@ int flashrom_layout_add_region(struct flashrom_layout *layout, size_t start, siz
|
||||
* 1 if the given name can't be found.
|
||||
*/
|
||||
int flashrom_layout_include_region(struct flashrom_layout *layout, const char *name);
|
||||
/**
|
||||
* @brief Mark given region as not included.
|
||||
*
|
||||
* @param layout The layout to alter.
|
||||
* @param name The name of the region to exclude.
|
||||
*
|
||||
* @return 0 on success,
|
||||
* 1 if the given name can't be found.
|
||||
*/
|
||||
int flashrom_layout_exclude_region(struct flashrom_layout *layout, const char *name);
|
||||
/**
|
||||
* @brief Get given region's offset and length.
|
||||
*
|
||||
|
Reference in New Issue
Block a user