summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-03-10 23:17:20 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-03-30 23:08:00 +0200
commit589beda5d919037310793d9751c7be8e3d0521a1 (patch)
tree4514198871c68ef493744caba249236c24643b57
parent8963b95e1aacddd3329ff3ed5d1c4957685df4b3 (diff)
Fix: use correct printf specifier for 64bit types
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
-rw-r--r--bin/rdsquashfs/stat.c6
-rw-r--r--extras/browse.c9
2 files changed, 10 insertions, 5 deletions
diff --git a/bin/rdsquashfs/stat.c b/bin/rdsquashfs/stat.c
index ae6e10b..8b4581f 100644
--- a/bin/rdsquashfs/stat.c
+++ b/bin/rdsquashfs/stat.c
@@ -130,8 +130,10 @@ int stat_file(const sqfs_tree_node_t *node)
printf("Fragment offset: %u\n", frag_offset);
printf("File size: %lu\n", (unsigned long)size);
- if (inode->base.type == SQFS_INODE_EXT_FILE)
- printf("Sparse: %lu\n", inode->data.file_ext.sparse);
+ if (inode->base.type == SQFS_INODE_EXT_FILE) {
+ printf("Sparse: " PRI_U64 "\n",
+ inode->data.file_ext.sparse);
+ }
printf("Blocks start: %lu\n", (unsigned long)location);
printf("Block count: %lu\n",
diff --git a/extras/browse.c b/extras/browse.c
index fe5bfd8..2899ba5 100644
--- a/extras/browse.c
+++ b/extras/browse.c
@@ -14,6 +14,7 @@
#include "sqfs/block.h"
#include "sqfs/dir.h"
#include "sqfs/io.h"
+#include "compat.h"
#include <string.h>
#include <stdlib.h>
@@ -353,7 +354,7 @@ static void stat_cmd(const char *filename)
}
break;
case SQFS_INODE_EXT_FILE:
- printf("Blocks start: %lu\n",
+ printf("Blocks start: " PRI_U64 "\n",
inode->data.file_ext.blocks_start);
printf("Block count: %lu\n",
(unsigned long)sqfs_inode_get_file_block_count(inode));
@@ -361,8 +362,10 @@ static void stat_cmd(const char *filename)
inode->data.file_ext.fragment_idx);
printf("Fragment offset: %u\n",
inode->data.file_ext.fragment_offset);
- printf("File size: %lu\n", inode->data.file_ext.file_size);
- printf("Sparse: %lu\n", inode->data.file_ext.sparse);
+ printf("File size: " PRI_U64 "\n",
+ inode->data.file_ext.file_size);
+ printf("Sparse: " PRI_U64 "\n",
+ inode->data.file_ext.sparse);
printf("Hard link count: %u\n", inode->data.file_ext.nlink);
printf("Xattr index: 0x%X\n", inode->data.file_ext.xattr_idx);