diff options
Diffstat (limited to 'extras')
-rw-r--r-- | extras/browse.c | 14 | ||||
-rw-r--r-- | extras/list_files.c | 4 | ||||
-rw-r--r-- | extras/mk42sqfs.c | 5 | ||||
-rw-r--r-- | extras/mknastyfs.c | 3 |
4 files changed, 12 insertions, 14 deletions
diff --git a/extras/browse.c b/extras/browse.c index 1d6417f..1cd2cf1 100644 --- a/extras/browse.c +++ b/extras/browse.c @@ -293,13 +293,13 @@ static void stat_cmd(const char *filename) case SQFS_INODE_SLINK: printf("Hard link count: %u\n", inode->data.slink.nlink); printf("Link target: %.*s\n", inode->data.slink.target_size, - inode->slink_target); + (const char *)inode->extra); break; case SQFS_INODE_EXT_SLINK: printf("Hard link count: %u\n", inode->data.slink_ext.nlink); printf("Xattr index: 0x%X\n", inode->data.slink_ext.xattr_idx); - printf("Link target: %.*s\n", - inode->data.slink_ext.target_size, inode->slink_target); + printf("Link target: %.*s\n", inode->data.slink_ext.target_size, + (const char *)inode->extra); break; case SQFS_INODE_FILE: printf("Blocks start: %u\n", inode->data.file.blocks_start); @@ -313,8 +313,8 @@ static void stat_cmd(const char *filename) for (i = 0; i < inode->num_file_blocks; ++i) { printf("\tBlock #%lu size: %u (%s)\n", (unsigned long)i, - inode->block_sizes[i] & 0x00FFFFFF, - inode->block_sizes[i] & (1 << 24) ? + inode->extra[i] & 0x00FFFFFF, + inode->extra[i] & (1 << 24) ? "uncompressed" : "compressed"); } break; @@ -334,8 +334,8 @@ static void stat_cmd(const char *filename) for (i = 0; i < inode->num_file_blocks; ++i) { printf("\tBlock #%lu size: %u (%s)\n", (unsigned long)i, - inode->block_sizes[i] & 0x00FFFFFF, - inode->block_sizes[i] & (1 << 24) ? + inode->extra[i] & 0x00FFFFFF, + inode->extra[i] & (1 << 24) ? "compressed" : "uncompressed"); } break; diff --git a/extras/list_files.c b/extras/list_files.c index 3f6725a..16fe360 100644 --- a/extras/list_files.c +++ b/extras/list_files.c @@ -34,10 +34,10 @@ static void write_tree_dfs(const sqfs_tree_node_t *n) if (n->inode->base.type == SQFS_INODE_SLINK) { printf(" ⭢ %.*s", n->inode->data.slink.target_size, - n->inode->slink_target); + (const char *)n->inode->extra); } else if (n->inode->base.type == SQFS_INODE_EXT_SLINK) { printf(" ⭢ %.*s", n->inode->data.slink_ext.target_size, - n->inode->slink_target); + (const char *)n->inode->extra); } fputc('\n', stdout); diff --git a/extras/mk42sqfs.c b/extras/mk42sqfs.c index 25c9047..1c55bf1 100644 --- a/extras/mk42sqfs.c +++ b/extras/mk42sqfs.c @@ -42,8 +42,7 @@ static sqfs_inode_generic_t *create_file_inode(sqfs_id_table_t *idtbl, inode->data.file.fragment_index = 0xFFFFFFFF; inode->num_file_blocks = 1; - inode->block_sizes = (sqfs_u32 *)inode->extra; - inode->block_sizes[0] = (1 << 24) | inode->data.file.file_size; + inode->extra[0] = (1 << 24) | inode->data.file.file_size; return inode; } @@ -144,7 +143,7 @@ int main(void) inode = create_file_inode(idtbl, inode_num++); inode->data.file.blocks_start = sizeof(super); inode->data.file.file_size = strlen(README); - inode->block_sizes[0] = (1 << 24) | inode->data.file.file_size; + inode->extra[0] = (1 << 24) | inode->data.file.file_size; sqfs_meta_writer_get_position(inode_m, &block_start, &offset); sqfs_meta_writer_write_inode(inode_m, inode); diff --git a/extras/mknastyfs.c b/extras/mknastyfs.c index 823bcf8..216c7eb 100644 --- a/extras/mknastyfs.c +++ b/extras/mknastyfs.c @@ -38,8 +38,7 @@ static sqfs_inode_generic_t *create_file_inode(sqfs_id_table_t *idtbl, inode->data.file.fragment_index = 0xFFFFFFFF; inode->num_file_blocks = 1; - inode->block_sizes = (sqfs_u32 *)inode->extra; - inode->block_sizes[0] = (1 << 24) | inode->data.file.file_size; + inode->extra[0] = (1 << 24) | inode->data.file.file_size; return inode; } |