diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fstree/src/fstree.c | 6 | ||||
-rw-r--r-- | lib/fstree/test/add_by_path.c | 6 | ||||
-rw-r--r-- | lib/fstree/test/fstree_sort.c | 2 | ||||
-rw-r--r-- | lib/fstree/test/gen_inode_numbers.c | 2 | ||||
-rw-r--r-- | lib/fstree/test/get_path.c | 6 | ||||
-rw-r--r-- | lib/fstree/test/mknode_dir.c | 6 | ||||
-rw-r--r-- | lib/fstree/test/mknode_simple.c | 6 | ||||
-rw-r--r-- | lib/io/src/dir_entry.c | 4 | ||||
-rw-r--r-- | lib/io/src/dir_tree_iterator.c | 10 | ||||
-rw-r--r-- | lib/io/src/unix/dir_iterator.c | 2 | ||||
-rw-r--r-- | lib/io/src/win32/dir_iterator.c | 4 | ||||
-rw-r--r-- | lib/io/test/dir_iterator.c | 6 | ||||
-rw-r--r-- | lib/io/test/dir_tree_iterator.c | 6 | ||||
-rw-r--r-- | lib/io/test/dir_tree_iterator2.c | 6 | ||||
-rw-r--r-- | lib/io/test/dir_tree_iterator3.c | 6 | ||||
-rw-r--r-- | lib/sqfs/src/dir_writer.c | 24 | ||||
-rw-r--r-- | lib/tar/src/iterator.c | 2 | ||||
-rw-r--r-- | lib/tar/test/tar_iterator.c | 2 | ||||
-rw-r--r-- | lib/tar/test/tar_iterator2.c | 2 | ||||
-rw-r--r-- | lib/tar/test/tar_iterator3.c | 2 |
20 files changed, 55 insertions, 55 deletions
diff --git a/lib/fstree/src/fstree.c b/lib/fstree/src/fstree.c index 1421d44..432a380 100644 --- a/lib/fstree/src/fstree.c +++ b/lib/fstree/src/fstree.c @@ -75,7 +75,7 @@ static void insert_sorted(tree_node_t *root, tree_node_t *n) static tree_node_t *mknode(fstree_t *fs, tree_node_t *parent, const char *name, size_t name_len, const char *extra, - const dir_entry_t *ent) + const sqfs_dir_entry_t *ent) { tree_node_t *n; size_t size; @@ -212,7 +212,7 @@ tree_node_t *fstree_get_node_by_path(fstree_t *fs, tree_node_t *root, n = child_by_name(root, path, len); if (n == NULL) { - dir_entry_t ent; + sqfs_dir_entry_t ent; if (!create_implicitly) { errno = ENOENT; @@ -239,7 +239,7 @@ tree_node_t *fstree_get_node_by_path(fstree_t *fs, tree_node_t *root, return root; } -tree_node_t *fstree_add_generic(fstree_t *fs, const dir_entry_t *ent, +tree_node_t *fstree_add_generic(fstree_t *fs, const sqfs_dir_entry_t *ent, const char *extra) { tree_node_t *child, *parent; diff --git a/lib/fstree/test/add_by_path.c b/lib/fstree/test/add_by_path.c index 4fd7d3d..b9f4b75 100644 --- a/lib/fstree/test/add_by_path.c +++ b/lib/fstree/test/add_by_path.c @@ -10,10 +10,10 @@ #include "common.h" #include "util/test.h" -static dir_entry_t *mkentry(const char *name, sqfs_u16 mode, sqfs_u32 uid, +static sqfs_dir_entry_t *mkentry(const char *name, sqfs_u16 mode, sqfs_u32 uid, sqfs_u32 gid) { - dir_entry_t *ent = dir_entry_create(name); + sqfs_dir_entry_t *ent = dir_entry_create(name); TEST_NOT_NULL(ent); ent->mode = mode; @@ -26,7 +26,7 @@ int main(int argc, char **argv) { fstree_defaults_t fsd; tree_node_t *a, *b; - dir_entry_t *ent; + sqfs_dir_entry_t *ent; fstree_t fs; char *opts; (void)argc; (void)argv; diff --git a/lib/fstree/test/fstree_sort.c b/lib/fstree/test/fstree_sort.c index 7bce367..6f20ce7 100644 --- a/lib/fstree/test/fstree_sort.c +++ b/lib/fstree/test/fstree_sort.c @@ -12,7 +12,7 @@ static tree_node_t *mkentry(fstree_t *fs, const char *name) { - dir_entry_t *ent = dir_entry_create(name); + sqfs_dir_entry_t *ent = dir_entry_create(name); tree_node_t *out; TEST_NOT_NULL(ent); diff --git a/lib/fstree/test/gen_inode_numbers.c b/lib/fstree/test/gen_inode_numbers.c index ea310a4..34d8322 100644 --- a/lib/fstree/test/gen_inode_numbers.c +++ b/lib/fstree/test/gen_inode_numbers.c @@ -12,7 +12,7 @@ static tree_node_t *gen_node(fstree_t *fs, const char *path) { - dir_entry_t *ent = dir_entry_create(path); + sqfs_dir_entry_t *ent = dir_entry_create(path); tree_node_t *ret; TEST_NOT_NULL(ent); diff --git a/lib/fstree/test/get_path.c b/lib/fstree/test/get_path.c index 50faeb4..f248c79 100644 --- a/lib/fstree/test/get_path.c +++ b/lib/fstree/test/get_path.c @@ -10,9 +10,9 @@ #include "common.h" #include "util/test.h" -static dir_entry_t *mkentry(const char *name) +static sqfs_dir_entry_t *mkentry(const char *name) { - dir_entry_t *ent = dir_entry_create(name); + sqfs_dir_entry_t *ent = dir_entry_create(name); TEST_NOT_NULL(ent); ent->mode = S_IFDIR | 0750; ent->uid = 1000; @@ -24,7 +24,7 @@ int main(int argc, char **argv) { tree_node_t *a, *b, *c, *d; fstree_defaults_t fsd; - dir_entry_t *ent; + sqfs_dir_entry_t *ent; fstree_t fs; char *str; (void)argc; (void)argv; diff --git a/lib/fstree/test/mknode_dir.c b/lib/fstree/test/mknode_dir.c index 080cc0e..f852706 100644 --- a/lib/fstree/test/mknode_dir.c +++ b/lib/fstree/test/mknode_dir.c @@ -9,9 +9,9 @@ #include "fstree.h" #include "util/test.h" -static dir_entry_t *mkentry(const char *name) +static sqfs_dir_entry_t *mkentry(const char *name) { - dir_entry_t *ent = dir_entry_create(name); + sqfs_dir_entry_t *ent = dir_entry_create(name); TEST_NOT_NULL(ent); ent->mode = S_IFDIR | 0654; ent->uid = 123; @@ -25,7 +25,7 @@ int main(int argc, char **argv) { fstree_defaults_t defaults; tree_node_t *root, *a, *b; - dir_entry_t *ent; + sqfs_dir_entry_t *ent; fstree_t fs; int ret; (void)argc; (void)argv; diff --git a/lib/fstree/test/mknode_simple.c b/lib/fstree/test/mknode_simple.c index 0e7c872..d871c5a 100644 --- a/lib/fstree/test/mknode_simple.c +++ b/lib/fstree/test/mknode_simple.c @@ -9,9 +9,9 @@ #include "fstree.h" #include "util/test.h" -static dir_entry_t *mkentry(const char *name, sqfs_u16 mode) +static sqfs_dir_entry_t *mkentry(const char *name, sqfs_u16 mode) { - dir_entry_t *ent = dir_entry_create(name); + sqfs_dir_entry_t *ent = dir_entry_create(name); TEST_NOT_NULL(ent); ent->mode = mode | 0654; ent->uid = 123; @@ -25,7 +25,7 @@ int main(int argc, char **argv) { fstree_defaults_t defaults; tree_node_t *node; - dir_entry_t *ent; + sqfs_dir_entry_t *ent; fstree_t fs; int ret; (void)argc; (void)argv; diff --git a/lib/io/src/dir_entry.c b/lib/io/src/dir_entry.c index 15f078f..1bfc887 100644 --- a/lib/io/src/dir_entry.c +++ b/lib/io/src/dir_entry.c @@ -10,10 +10,10 @@ #include <stdlib.h> #include <string.h> -dir_entry_t *dir_entry_create(const char *name) +sqfs_dir_entry_t *dir_entry_create(const char *name) { size_t len, name_len; - dir_entry_t *out; + sqfs_dir_entry_t *out; name_len = strlen(name); if (SZ_ADD_OV(name_len, 1, &name_len)) diff --git a/lib/io/src/dir_tree_iterator.c b/lib/io/src/dir_tree_iterator.c index 4303817..989907b 100644 --- a/lib/io/src/dir_tree_iterator.c +++ b/lib/io/src/dir_tree_iterator.c @@ -51,7 +51,7 @@ static int push(dir_tree_iterator_t *it, const char *name, dir_iterator_t *dir) return 0; } -static bool should_skip(const dir_tree_iterator_t *dir, const dir_entry_t *ent) +static bool should_skip(const dir_tree_iterator_t *dir, const sqfs_dir_entry_t *ent) { unsigned int type_mask; @@ -76,7 +76,7 @@ static bool should_skip(const dir_tree_iterator_t *dir, const dir_entry_t *ent) return (dir->cfg.flags & type_mask) != 0; } -static dir_entry_t *expand_path(const dir_tree_iterator_t *it, dir_entry_t *ent) +static sqfs_dir_entry_t *expand_path(const dir_tree_iterator_t *it, sqfs_dir_entry_t *ent) { size_t slen = strlen(ent->name) + 1, plen = 0; dir_stack_t *sit; @@ -120,7 +120,7 @@ static dir_entry_t *expand_path(const dir_tree_iterator_t *it, dir_entry_t *ent) return ent; } -static void apply_changes(const dir_tree_iterator_t *it, dir_entry_t *ent) +static void apply_changes(const dir_tree_iterator_t *it, sqfs_dir_entry_t *ent) { if (!(it->cfg.flags & DIR_SCAN_KEEP_TIME)) ent->mtime = it->cfg.def_mtime; @@ -149,11 +149,11 @@ static void destroy(sqfs_object_t *obj) free(it); } -static int next(dir_iterator_t *base, dir_entry_t **out) +static int next(dir_iterator_t *base, sqfs_dir_entry_t **out) { dir_tree_iterator_t *it = (dir_tree_iterator_t *)base; dir_iterator_t *sub; - dir_entry_t *ent; + sqfs_dir_entry_t *ent; int ret; retry: *out = NULL; diff --git a/lib/io/src/unix/dir_iterator.c b/lib/io/src/unix/dir_iterator.c index 5129eb0..99713fd 100644 --- a/lib/io/src/unix/dir_iterator.c +++ b/lib/io/src/unix/dir_iterator.c @@ -73,7 +73,7 @@ static int dir_read_link(dir_iterator_t *base, char **out) return 0; } -static int dir_next(dir_iterator_t *base, dir_entry_t **out) +static int dir_next(dir_iterator_t *base, sqfs_dir_entry_t **out) { unix_dir_iterator_t *it = (unix_dir_iterator_t *)base; diff --git a/lib/io/src/win32/dir_iterator.c b/lib/io/src/win32/dir_iterator.c index 22b4870..b7a47b9 100644 --- a/lib/io/src/win32/dir_iterator.c +++ b/lib/io/src/win32/dir_iterator.c @@ -50,10 +50,10 @@ static int dir_iterator_read_link(dir_iterator_t *it, char **out) return SQFS_ERROR_UNSUPPORTED; } -static int dir_iterator_next(dir_iterator_t *it, dir_entry_t **out) +static int dir_iterator_next(dir_iterator_t *it, sqfs_dir_entry_t **out) { dir_iterator_win32_t *w32 = (dir_iterator_win32_t *)it; - dir_entry_t *ent = NULL; + sqfs_dir_entry_t *ent = NULL; DWORD length; if (w32->state == 0 && !w32->is_first) { diff --git a/lib/io/test/dir_iterator.c b/lib/io/test/dir_iterator.c index 57e76ab..1f04b96 100644 --- a/lib/io/test/dir_iterator.c +++ b/lib/io/test/dir_iterator.c @@ -13,8 +13,8 @@ static int compare_entries(const void *a, const void *b) { - const dir_entry_t *const *lhs = a; - const dir_entry_t *const *rhs = b; + const sqfs_dir_entry_t *const *lhs = a; + const sqfs_dir_entry_t *const *rhs = b; return strcmp((*lhs)->name, (*rhs)->name); } @@ -22,7 +22,7 @@ static int compare_entries(const void *a, const void *b) int main(int argc, char **argv) { dir_iterator_t *dir, *suba, *subb, *subc, *sub; - dir_entry_t *dent, *ent[6]; + sqfs_dir_entry_t *dent, *ent[6]; size_t i; int ret; (void)argc; (void)argv; diff --git a/lib/io/test/dir_tree_iterator.c b/lib/io/test/dir_tree_iterator.c index 0c735e2..14fad7e 100644 --- a/lib/io/test/dir_tree_iterator.c +++ b/lib/io/test/dir_tree_iterator.c @@ -13,15 +13,15 @@ static int compare_entries(const void *a, const void *b) { - const dir_entry_t *const *lhs = a; - const dir_entry_t *const *rhs = b; + const sqfs_dir_entry_t *const *lhs = a; + const sqfs_dir_entry_t *const *rhs = b; return strcmp((*lhs)->name, (*rhs)->name); } int main(int argc, char **argv) { - dir_entry_t *ent[17]; + sqfs_dir_entry_t *ent[17]; dir_iterator_t *dir; dir_tree_cfg_t cfg; size_t i; diff --git a/lib/io/test/dir_tree_iterator2.c b/lib/io/test/dir_tree_iterator2.c index 280fa78..961cd39 100644 --- a/lib/io/test/dir_tree_iterator2.c +++ b/lib/io/test/dir_tree_iterator2.c @@ -13,15 +13,15 @@ static int compare_entries(const void *a, const void *b) { - const dir_entry_t *const *lhs = a; - const dir_entry_t *const *rhs = b; + const sqfs_dir_entry_t *const *lhs = a; + const sqfs_dir_entry_t *const *rhs = b; return strcmp((*lhs)->name, (*rhs)->name); } int main(int argc, char **argv) { - dir_entry_t *ent[17]; + sqfs_dir_entry_t *ent[17]; dir_iterator_t *dir; dir_tree_cfg_t cfg; size_t i; diff --git a/lib/io/test/dir_tree_iterator3.c b/lib/io/test/dir_tree_iterator3.c index 180beff..5e414d7 100644 --- a/lib/io/test/dir_tree_iterator3.c +++ b/lib/io/test/dir_tree_iterator3.c @@ -13,15 +13,15 @@ static int compare_entries(const void *a, const void *b) { - const dir_entry_t *const *lhs = a; - const dir_entry_t *const *rhs = b; + const sqfs_dir_entry_t *const *lhs = a; + const sqfs_dir_entry_t *const *rhs = b; return strcmp((*lhs)->name, (*rhs)->name); } int main(int argc, char **argv) { - dir_entry_t *ent[17]; + sqfs_dir_entry_t *ent[17]; dir_iterator_t *dir; dir_tree_cfg_t cfg; size_t i; diff --git a/lib/sqfs/src/dir_writer.c b/lib/sqfs/src/dir_writer.c index 3f7fed1..3e2114a 100644 --- a/lib/sqfs/src/dir_writer.c +++ b/lib/sqfs/src/dir_writer.c @@ -23,18 +23,18 @@ #define DIR_INDEX_THRESHOLD (256) -typedef struct dir_entry_t { - struct dir_entry_t *next; +typedef struct sqfs_dir_entry_t { + struct sqfs_dir_entry_t *next; sqfs_u64 inode_ref; sqfs_u32 inode_num; sqfs_u16 type; size_t name_len; char name[]; -} dir_entry_t; +} sqfs_dir_entry_t; typedef struct index_ent_t { struct index_ent_t *next; - dir_entry_t *ent; + sqfs_dir_entry_t *ent; sqfs_u64 block; sqfs_u32 index; } index_ent_t; @@ -42,8 +42,8 @@ typedef struct index_ent_t { struct sqfs_dir_writer_t { sqfs_object_t base; - dir_entry_t *list; - dir_entry_t *list_end; + sqfs_dir_entry_t *list; + sqfs_dir_entry_t *list_end; index_ent_t *idx; index_ent_t *idx_end; @@ -75,7 +75,7 @@ static int get_type(sqfs_u16 mode) static void writer_reset(sqfs_dir_writer_t *writer) { - dir_entry_t *ent; + sqfs_dir_entry_t *ent; index_ent_t *idx; while (writer->idx != NULL) { @@ -183,7 +183,7 @@ int sqfs_dir_writer_add_entry(sqfs_dir_writer_t *writer, const char *name, sqfs_u32 inode_num, sqfs_u64 inode_ref, sqfs_u16 mode) { - dir_entry_t *ent; + sqfs_dir_entry_t *ent; int type, err; type = get_type(mode); @@ -218,10 +218,10 @@ int sqfs_dir_writer_add_entry(sqfs_dir_writer_t *writer, const char *name, return 0; } -static size_t get_conseq_entry_count(sqfs_u32 offset, dir_entry_t *head) +static size_t get_conseq_entry_count(sqfs_u32 offset, sqfs_dir_entry_t *head) { size_t size, count = 0; - dir_entry_t *it; + sqfs_dir_entry_t *it; sqfs_s32 diff; size = (offset + sizeof(sqfs_dir_header_t)) % SQFS_META_BLOCK_SIZE; @@ -250,7 +250,7 @@ static size_t get_conseq_entry_count(sqfs_u32 offset, dir_entry_t *head) } static int add_header(sqfs_dir_writer_t *writer, size_t count, - dir_entry_t *ref, sqfs_u64 block) + sqfs_dir_entry_t *ref, sqfs_u64 block) { sqfs_dir_header_t hdr; index_ent_t *idx; @@ -285,7 +285,7 @@ static int add_header(sqfs_dir_writer_t *writer, size_t count, int sqfs_dir_writer_end(sqfs_dir_writer_t *writer) { - dir_entry_t *it, *first; + sqfs_dir_entry_t *it, *first; sqfs_dir_node_t ent; sqfs_u16 *diff_u16; size_t i, count; diff --git a/lib/tar/src/iterator.c b/lib/tar/src/iterator.c index 506148f..b11be77 100644 --- a/lib/tar/src/iterator.c +++ b/lib/tar/src/iterator.c @@ -164,7 +164,7 @@ static void strm_destroy(sqfs_object_t *obj) /*****************************************************************************/ -static int it_next(dir_iterator_t *it, dir_entry_t **out) +static int it_next(dir_iterator_t *it, sqfs_dir_entry_t **out) { tar_iterator_t *tar = (tar_iterator_t *)it; int ret; diff --git a/lib/tar/test/tar_iterator.c b/lib/tar/test/tar_iterator.c index e59b210..6931a7c 100644 --- a/lib/tar/test/tar_iterator.c +++ b/lib/tar/test/tar_iterator.c @@ -32,7 +32,7 @@ int main(int argc, char **argv) { sqfs_istream_t *fp, *ti, *ti2; dir_iterator_t *it; - dir_entry_t *ent; + sqfs_dir_entry_t *ent; char buffer[100]; sqfs_s32 ret; sqfs_s64 ts; diff --git a/lib/tar/test/tar_iterator2.c b/lib/tar/test/tar_iterator2.c index ac041fe..681835d 100644 --- a/lib/tar/test/tar_iterator2.c +++ b/lib/tar/test/tar_iterator2.c @@ -46,7 +46,7 @@ int main(int argc, char **argv) unsigned char buffer[941]; sqfs_istream_t *fp, *ti; dir_iterator_t *it; - dir_entry_t *ent; + sqfs_dir_entry_t *ent; uint64_t offset; sqfs_s32 i, ret; int iret; diff --git a/lib/tar/test/tar_iterator3.c b/lib/tar/test/tar_iterator3.c index 214fe9c..36a9060 100644 --- a/lib/tar/test/tar_iterator3.c +++ b/lib/tar/test/tar_iterator3.c @@ -16,7 +16,7 @@ int main(int argc, char **argv) sqfs_istream_t *fp, *ti; dir_iterator_t *it; char buffer[100]; - dir_entry_t *ent; + sqfs_dir_entry_t *ent; char *link; int ret; (void)argc; (void)argv; |