* find the partition by name * * @param name partition name * * @return != NULL: partition * NULL: not found */
| 328 | * NULL: not found |
| 329 | */ |
| 330 | const struct fal_partition *fal_partition_find(const char *name) |
| 331 | { |
| 332 | if (!init_ok) |
| 333 | return NULL; |
| 334 | |
| 335 | rt_size_t i; |
| 336 | |
| 337 | for (i = 0; i < partition_table_len; i++) |
| 338 | { |
| 339 | if (!strcmp(name, partition_table[i].name)) |
| 340 | { |
| 341 | return &partition_table[i]; |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | return NULL; |
| 346 | } |
| 347 | |
| 348 | static const struct fal_flash_dev *flash_device_find_by_part(const struct fal_partition *part) |
| 349 | { |
no outgoing calls