summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-09-27 12:17:53 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2017-09-27 14:02:20 +0200
commit9f36f6d615ab6eca2e37823213c0f6f3ead25921 (patch)
treeb1dcaf47a01bf6c33c7643478e329bb13cfe4502 /include
parent87f3efc26e3f4d8f171c56bdd819088f79e1110c (diff)
downloadbarebox-9f36f6d615ab6eca2e37823213c0f6f3ead25921.tar.gz
barebox-9f36f6d615ab6eca2e37823213c0f6f3ead25921.tar.xz
file_list: Add function to add an entry to the list
Add file_list_add_entry() to add a single entry to a file_list. Then use it in file_list_parse_one() instead of open coding adding a new entry. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/file-list.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/file-list.h b/include/file-list.h
index 608181ff8d..ccdc2b5efd 100644
--- a/include/file-list.h
+++ b/include/file-list.h
@@ -20,6 +20,9 @@ struct file_list {
struct file_list *file_list_parse(const char *str);
void file_list_free(struct file_list *);
+int file_list_add_entry(struct file_list *files, const char *name, const char *filename,
+ unsigned long flags);
+
#define file_list_for_each_entry(files, entry) \
list_for_each_entry(entry, &files->list, list)