diff options
-rw-r--r-- | bin/gensquashfs/mkfs.c | 5 | ||||
-rw-r--r-- | bin/tar2sqfs/process_tarball.c | 3 | ||||
-rw-r--r-- | include/fstree.h | 2 | ||||
-rw-r--r-- | lib/common/writer/serialize_fstree.c | 4 |
4 files changed, 5 insertions, 9 deletions
diff --git a/bin/gensquashfs/mkfs.c b/bin/gensquashfs/mkfs.c index ac53623..9e8e2d0 100644 --- a/bin/gensquashfs/mkfs.c +++ b/bin/gensquashfs/mkfs.c @@ -9,7 +9,6 @@ static int pack_files(sqfs_block_processor_t *data, fstree_t *fs, options_t *opt) { - sqfs_inode_generic_t **inode_ptr; sqfs_u64 filesize; sqfs_file_t *file; tree_node_t *node; @@ -59,9 +58,7 @@ static int pack_files(sqfs_block_processor_t *data, fstree_t *fs, if (opt->no_tail_packing && filesize > opt->cfg.block_size) flags |= SQFS_BLK_DONT_FRAGMENT; - inode_ptr = (sqfs_inode_generic_t **)&fi->user_ptr; - - ret = write_data_from_file(path, data, inode_ptr, file, flags); + ret = write_data_from_file(path, data, &fi->inode, file, flags); sqfs_destroy(file); free(node_path); diff --git a/bin/tar2sqfs/process_tarball.c b/bin/tar2sqfs/process_tarball.c index 40a8157..1118822 100644 --- a/bin/tar2sqfs/process_tarball.c +++ b/bin/tar2sqfs/process_tarball.c @@ -19,8 +19,7 @@ static int write_file(istream_t *input_file, sqfs_writer_t *sqfs, if (no_tail_pack && filesize > cfg.block_size) flags |= SQFS_BLK_DONT_FRAGMENT; - out = data_writer_ostream_create(hdr->name, sqfs->data, - (sqfs_inode_generic_t **)&fi->user_ptr, + out = data_writer_ostream_create(hdr->name, sqfs->data, &fi->inode, flags); if (out == NULL) diff --git a/include/fstree.h b/include/fstree.h index 3cc4f48..5bdfc7a 100644 --- a/include/fstree.h +++ b/include/fstree.h @@ -58,7 +58,7 @@ struct file_info_t { /* Path to the input file. */ char *input_file; - void *user_ptr; + sqfs_inode_generic_t *inode; }; /* Additional meta data stored in a tree_node_t for directories */ diff --git a/lib/common/writer/serialize_fstree.c b/lib/common/writer/serialize_fstree.c index c69f0ea..b15f30d 100644 --- a/lib/common/writer/serialize_fstree.c +++ b/lib/common/writer/serialize_fstree.c @@ -120,8 +120,8 @@ static int serialize_tree_node(const char *filename, sqfs_writer_t *wr, inode = write_dir_entries(filename, wr->dirwr, n); ret = SQFS_ERROR_INTERNAL; } else if (S_ISREG(n->mode)) { - inode = n->data.file.user_ptr; - n->data.file.user_ptr = NULL; + inode = n->data.file.inode; + n->data.file.inode = NULL; ret = SQFS_ERROR_INTERNAL; if (inode->base.type == SQFS_INODE_FILE && n->link_count > 1) { |