| 351 | } |
| 352 | |
| 353 | const struct flashmap_descriptor *fmd_find_node( |
| 354 | const struct flashmap_descriptor *root, const char *name) |
| 355 | { |
| 356 | assert(root); |
| 357 | assert(name); |
| 358 | |
| 359 | if (strcmp(root->name, name) == 0) |
| 360 | return root; |
| 361 | |
| 362 | fmd_foreach_child(descendant, root) { |
| 363 | const struct flashmap_descriptor *match = |
| 364 | fmd_find_node(descendant, name); |
| 365 | if (match) |
| 366 | return match; |
| 367 | } |
| 368 | return NULL; |
| 369 | } |
| 370 | |
| 371 | unsigned fmd_calc_absolute_offset(const struct flashmap_descriptor *root, |
| 372 | const char *name) |