aboutsummaryrefslogtreecommitdiff
path: root/include/common.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-11-01 11:51:49 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-03-30 22:31:30 +0200
commita41a57834fc70541ada5579e2d74114f7113e9bc (patch)
tree0488f919013b472bb25cb678388ee911a380a0f1 /include/common.h
parent27dfe8bf61a40e6b1a7f736119bf21037eaea2b9 (diff)
Add sort-file implementation
A `flags` field and `priority` are added to all file information structs. A news fstree function is introduced for parsing a "sort-file". Each line in the file is space separated, and has the following format: priority [flags] filename Priority is a 64 bit number, flags are optional and filename can be put in quotes if it is supposed to start or end with spaces. Single line comments can be used. The flags can be used to set block-processor flags (e.g. don't fragment, or don't compress), as well as instructing the parser to use file globbing to match the filename. After parsing the file, the list of file info structure is sorted according to the priority (default is 0) using a stable sort algorithm. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/common.h')
-rw-r--r--include/common.h3
1 files changed, 0 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);