summaryrefslogtreecommitdiff
path: root/include/fstree.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-27 18:15:40 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-27 18:15:40 +0200
commit40232f4bd4d7e8e001f7d1e8f120606f59b2c147 (patch)
tree5d763f4f22a487fd2e669efe0970615096f1f5fd /include/fstree.h
parentf6904a98bffe0bce5fc6aac408c141a25c0e05ab (diff)
Cleanup: replace fixed with data types with typedefs
This is a fully automated search and replace, i.e. I ran this: git grep -l uint8_t | xargs sed -i 's/uint8_t/sqfs_u8/g' git grep -l uint16_t | xargs sed -i 's/uint16_t/sqfs_u16/g' git grep -l uint32_t | xargs sed -i 's/uint32_t/sqfs_u32/g' git grep -l uint64_t | xargs sed -i 's/uint64_t/sqfs_u64/g' git grep -l int8_t | xargs sed -i 's/int8_t/sqfs_s8/g' git grep -l int16_t | xargs sed -i 's/int16_t/sqfs_s16/g' git grep -l int32_t | xargs sed -i 's/int32_t/sqfs_s32/g' git grep -l int64_t | xargs sed -i 's/int64_t/sqfs_s64/g' and than added the appropriate definitions to sqfs/predef.h The whole point being better compatibillity with platforms that may not have an stdint.h with the propper definitions. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/fstree.h')
-rw-r--r--include/fstree.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/fstree.h b/include/fstree.h
index 11da854..dbd2cd6 100644
--- a/include/fstree.h
+++ b/include/fstree.h
@@ -44,13 +44,13 @@ struct tree_xattr_t {
size_t max_attr;
/* Offset of the meta data block where the pairs are stored */
- uint64_t block;
+ sqfs_u64 block;
/* Offset into a meta data block where the pairs start */
- uint32_t offset;
+ sqfs_u32 offset;
/* Number of bytes written to disk */
- uint32_t size;
+ sqfs_u32 size;
/* Incremental index within all xattr blocks */
size_t index;
@@ -63,8 +63,8 @@ struct tree_xattr_t {
/* Array with pairs of key-value tupples */
struct {
- uint32_t key_index;
- uint32_t value_index;
+ sqfs_u32 key_index;
+ sqfs_u32 value_index;
} attr[];
};
@@ -108,29 +108,29 @@ struct tree_node_t {
*/
tree_xattr_t *xattr;
- uint32_t uid;
- uint32_t gid;
- uint32_t inode_num;
- uint32_t mod_time;
- uint16_t mode;
- uint16_t pad0[3];
+ sqfs_u32 uid;
+ sqfs_u32 gid;
+ sqfs_u32 inode_num;
+ sqfs_u32 mod_time;
+ sqfs_u16 mode;
+ sqfs_u16 pad0[3];
/* SquashFS inode refernce number. 32 bit offset of the meta data
block start (relative to inode table start), shifted left by 16
and ored with a 13 bit offset into the uncompressed meta data block.
Generated on the fly when writing inodes. */
- uint64_t inode_ref;
+ sqfs_u64 inode_ref;
/* Type specific data. Pointers are into payload area blow. */
union {
dir_info_t dir;
file_info_t file;
char *slink_target;
- uint64_t devno;
+ sqfs_u64 devno;
} data;
- uint8_t payload[];
+ sqfs_u8 payload[];
};
/* Encapsulates a file system tree */
@@ -266,6 +266,6 @@ void tree_node_sort_recursive(tree_node_t *root);
that fits into an unsigned 32 bit value, return its value. Otherwise,
default to 0.
*/
-uint32_t get_source_date_epoch(void);
+sqfs_u32 get_source_date_epoch(void);
#endif /* FSTREE_H */