summaryrefslogtreecommitdiff
path: root/unpack/list_files.c
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 /unpack/list_files.c
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 'unpack/list_files.c')
-rw-r--r--unpack/list_files.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unpack/list_files.c b/unpack/list_files.c
index ae259bd..0d64010 100644
--- a/unpack/list_files.c
+++ b/unpack/list_files.c
@@ -6,7 +6,7 @@
*/
#include "rdsquashfs.h"
-static void mode_to_str(uint16_t mode, char *p)
+static void mode_to_str(sqfs_u16 mode, char *p)
{
switch (mode & S_IFMT) {
case S_IFDIR: *(p++) = 'd'; break;
@@ -64,7 +64,7 @@ static int count_int_chars(unsigned int i)
return count;
}
-static void print_size(uint64_t size, char *buffer)
+static void print_size(sqfs_u64 size, char *buffer)
{
static const char *suffices = "kMGTPEZY";
int suffix = -1;
@@ -88,7 +88,7 @@ static void print_node_size(const sqfs_tree_node_t *n, char *buffer)
print_size(strlen(n->inode->slink_target), buffer);
break;
case S_IFREG: {
- uint64_t size;
+ sqfs_u64 size;
sqfs_inode_get_file_size(n->inode, &size);
print_size(size, buffer);
break;
@@ -102,7 +102,7 @@ static void print_node_size(const sqfs_tree_node_t *n, char *buffer)
break;
case S_IFBLK:
case S_IFCHR: {
- uint32_t devno;
+ sqfs_u32 devno;
if (n->inode->base.type == SQFS_INODE_EXT_BDEV ||
n->inode->base.type == SQFS_INODE_EXT_CDEV) {