aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/common.h3
-rw-r--r--include/fstree.h11
2 files changed, 11 insertions, 3 deletions
diff --git a/include/common.h b/include/common.h
index b0c7abb..df3017a 100644
--- a/include/common.h
+++ b/include/common.h
@@ -33,9 +33,6 @@ typedef struct sqfs_hard_link_t {
char *target;
} sqfs_hard_link_t;
-#define container_of(ptr, type, member) \
- ((type *)((char *)ptr - offsetof(type, member)))
-
int inode_stat(const sqfs_tree_node_t *node, struct stat *sb);
char *sqfs_tree_node_get_path(const sqfs_tree_node_t *node);
diff --git a/include/fstree.h b/include/fstree.h
index 5bdfc7a..9868e8e 100644
--- a/include/fstree.h
+++ b/include/fstree.h
@@ -15,6 +15,7 @@
#include <stdio.h>
#include "sqfs/predef.h"
+#include "fstream.h"
#include "compat.h"
enum {
@@ -41,6 +42,9 @@ typedef struct file_info_t file_info_t;
typedef struct dir_info_t dir_info_t;
typedef struct fstree_t fstree_t;
+#define container_of(ptr, type, member) \
+ ((type *)((char *)ptr - offsetof(type, member)))
+
/*
Optionally used by fstree_from_dir and fstree_from_subdir to
execute custom actions for each discovered node.
@@ -59,6 +63,11 @@ struct file_info_t {
char *input_file;
sqfs_inode_generic_t *inode;
+
+ /* used by sort file processing */
+ sqfs_s64 priority;
+ int flags;
+ bool already_matched;
};
/* Additional meta data stored in a tree_node_t for directories */
@@ -274,4 +283,6 @@ int fstree_from_subdir(fstree_t *fs, tree_node_t *root,
const char *path, const char *subdir,
scan_node_callback cb, void *user, unsigned int flags);
+int fstree_sort_files(fstree_t *fs, istream_t *sortfile);
+
#endif /* FSTREE_H */