summaryrefslogtreecommitdiffstats
path: root/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'layout.c')
-rw-r--r--layout.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/layout.c b/layout.c
index 52aa3882e..e49189eb4 100644
--- a/layout.c
+++ b/layout.c
@@ -252,6 +252,24 @@ const struct romentry *layout_next_included_region(
return lowest;
}
+const struct romentry *layout_next_included(
+ const struct flashrom_layout *const layout, const struct romentry *iterator)
+{
+ const struct romentry *const end = layout->entries + layout->num_entries;
+
+ if (iterator)
+ ++iterator;
+ else
+ iterator = &layout->entries[0];
+
+ for (; iterator < end; ++iterator) {
+ if (!iterator->included)
+ continue;
+ return iterator;
+ }
+ return NULL;
+}
+
/**
* @addtogroup flashrom-layout
* @{