diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-05-03 13:48:59 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-05-12 08:00:00 +0200 |
commit | 00e5e596df0b6db478bad982fd38867bd5582e76 (patch) | |
tree | 68b5df02138483a3e54b01b69532d9576c3e7841 /include | |
parent | 49697b065a04d5a5713ba90626dc4259fd007232 (diff) | |
download | barebox-00e5e596df0b6db478bad982fd38867bd5582e76.tar.gz barebox-00e5e596df0b6db478bad982fd38867bd5582e76.tar.xz |
file_list: add file_list_detect_all()
This is a common theme along the code that uses file_lists.
Add a function that abstracts it. This could later be used
to simplify this operation in the fastboot code.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210503114901.13095-15-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/file-list.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/file-list.h b/include/file-list.h index be97a49b7a..7e2a4d9205 100644 --- a/include/file-list.h +++ b/include/file-list.h @@ -30,6 +30,8 @@ int file_list_add_entry(struct file_list *files, const char *name, const char *f struct file_list *file_list_dup(struct file_list *old); +int file_list_detect_all(const struct file_list *files); + struct file_list_entry *file_list_entry_by_name(struct file_list *files, const char *name); #define file_list_for_each_entry(files, entry) \ |