summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/file-list.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/file-list.c b/common/file-list.c
index 010f8f0617..0b760c1aec 100644
--- a/common/file-list.c
+++ b/common/file-list.c
@@ -8,6 +8,18 @@
#define PARSE_NAME 1
#define PARSE_FLAGS 2
+struct file_list_entry *file_list_entry_by_name(struct file_list *files, const char *name)
+{
+ struct file_list_entry *entry;
+
+ file_list_for_each_entry(files, entry) {
+ if (!strcmp(entry->name, name))
+ return entry;
+ }
+
+ return NULL;
+}
+
int file_list_add_entry(struct file_list *files, const char *name, const char *filename,
unsigned long flags)
{