MCPcopy Create free account
hub / github.com/coreboot/coreboot / image_node

Function image_node

src/lib/fit.c:109–134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109static void image_node(struct device_tree_node *node)
110{
111 struct fit_image_node *image = xzalloc(sizeof(*image));
112
113 image->compression = CBFS_COMPRESS_NONE;
114 image->name = node->name;
115
116 struct device_tree_property *prop;
117 list_for_each(prop, node->properties, list_node) {
118 if (!strcmp("data", prop->prop.name)) {
119 image->data = prop->prop.data;
120 image->size = prop->prop.size;
121 } else if (!strcmp("compression", prop->prop.name)) {
122 if (!strcmp("none", prop->prop.data))
123 image->compression = CBFS_COMPRESS_NONE;
124 else if (!strcmp("lzma", prop->prop.data))
125 image->compression = CBFS_COMPRESS_LZMA;
126 else if (!strcmp("lz4", prop->prop.data))
127 image->compression = CBFS_COMPRESS_LZ4;
128 else
129 image->compression = -1;
130 }
131 }
132
133 list_insert_after(&image->list_node, &image_nodes);
134}
135
136static void config_node(struct device_tree_node *node)
137{

Callers 1

fit_unpackFunction · 0.85

Calls 2

list_insert_afterFunction · 0.85
strcmpFunction · 0.70

Tested by

no test coverage detected