summaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfs_sections.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/cbfs_sections.c')
-rw-r--r--util/cbfstool/cbfs_sections.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/util/cbfstool/cbfs_sections.c b/util/cbfstool/cbfs_sections.c
index f87b2c8b5a..285725760b 100644
--- a/util/cbfstool/cbfs_sections.c
+++ b/util/cbfstool/cbfs_sections.c
@@ -57,26 +57,25 @@ static void descriptor_list_append(struct descriptor_list *list,
}
/* Implementation of cbfs module's callback; invoked during fmd file parsing */
-bool fmd_process_annotation_impl(const struct flashmap_descriptor *node,
- const char *annotation)
+bool fmd_process_flag_cbfs(const struct flashmap_descriptor *node)
{
- if (strcmp(annotation, SECTION_ANNOTATION_CBFS) == 0 &&
- node->list_len == 0) {
- struct descriptor_node *list_node = malloc(sizeof(*list_node));
- list_node->val = node;
- list_node->next = NULL;
-
- if (strcmp(node->name, SECTION_NAME_PRIMARY_CBFS) == 0) {
- descriptor_list_prepend(&cbfs_sections, list_node);
- seen_primary_section = true;
- } else {
- descriptor_list_append(&cbfs_sections, list_node);
- }
-
- return true;
+ struct descriptor_node *list_node;
+
+ if (node->list_len != 0)
+ return false;
+
+ list_node = (struct descriptor_node *)malloc(sizeof(*list_node));
+ list_node->val = node;
+ list_node->next = NULL;
+
+ if (strcmp(node->name, SECTION_NAME_PRIMARY_CBFS) == 0) {
+ descriptor_list_prepend(&cbfs_sections, list_node);
+ seen_primary_section = true;
+ } else {
+ descriptor_list_append(&cbfs_sections, list_node);
}
- return false;
+ return true;
}
cbfs_section_iterator_t cbfs_sections_iterator(void)