aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/highlevel.h15
-rw-r--r--lib/sqfshelper/data_writer.c6
-rw-r--r--mkfs/mkfs.c3
-rw-r--r--tar/tar2sqfs.c4
4 files changed, 6 insertions, 22 deletions
diff --git a/include/highlevel.h b/include/highlevel.h
index 5bc4a96..77360f0 100644
--- a/include/highlevel.h
+++ b/include/highlevel.h
@@ -43,19 +43,6 @@ typedef struct {
uint64_t bytes_read;
} data_writer_stats_t;
-enum {
- /* Don't generate fragments, always write the last block to disk as a
- block, even if it is incomplete. */
- DW_DONT_FRAGMENT = 0x01,
-
- /* Intentionally write all blocks uncompressed. */
- DW_DONT_COMPRESS = 0x02,
-
- /* Make sure the first block of a file is alligned to
- device block size */
- DW_ALLIGN_DEVBLK = 0x04,
-};
-
/*
High level helper function to serialize an entire file system tree to
a squashfs inode table and directory table.
@@ -116,6 +103,6 @@ sqfs_file_t *sqfs_get_stdin_file(const sparse_map_t *map, uint64_t size);
void register_stat_hooks(sqfs_data_writer_t *data, data_writer_stats_t *stats);
int write_data_from_file(sqfs_data_writer_t *data, sqfs_inode_generic_t *inode,
- sqfs_file_t *file, size_t block_size, int flags);
+ sqfs_file_t *file, int flags);
#endif /* HIGHLEVEL_H */
diff --git a/lib/sqfshelper/data_writer.c b/lib/sqfshelper/data_writer.c
index 71dd4be..d9e11a6 100644
--- a/lib/sqfshelper/data_writer.c
+++ b/lib/sqfshelper/data_writer.c
@@ -12,15 +12,13 @@
static uint8_t buffer[4096];
int write_data_from_file(sqfs_data_writer_t *data, sqfs_inode_generic_t *inode,
- sqfs_file_t *file, size_t block_size, int flags)
+ sqfs_file_t *file, int flags)
{
uint64_t filesz, offset;
size_t diff;
int ret;
- (void)block_size;
- (void)flags;
- if (sqfs_data_writer_begin_file(data, inode, 0))
+ if (sqfs_data_writer_begin_file(data, inode, flags))
return -1;
sqfs_inode_get_file_size(inode, &filesz);
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c
index 71e1863..0d50afd 100644
--- a/mkfs/mkfs.c
+++ b/mkfs/mkfs.c
@@ -73,8 +73,7 @@ static int pack_files(sqfs_data_writer_t *data, fstree_t *fs,
fi->user_ptr = inode;
- ret = write_data_from_file(data, inode, file,
- fs->block_size, 0);
+ ret = write_data_from_file(data, inode, file, 0);
file->destroy(file);
if (ret)
diff --git a/tar/tar2sqfs.c b/tar/tar2sqfs.c
index 4770810..2b5d3b2 100644
--- a/tar/tar2sqfs.c
+++ b/tar/tar2sqfs.c
@@ -111,7 +111,6 @@ static bool no_xattr = false;
static bool exportable = false;
static bool keep_time = false;
static data_writer_stats_t stats;
-static sqfs_super_t super;
static void process_args(int argc, char **argv)
{
@@ -267,7 +266,7 @@ static int write_file(tar_header_decoded_t *hdr, file_info_t *fi,
}
}
- ret = write_data_from_file(data, inode, file, super.block_size, 0);
+ ret = write_data_from_file(data, inode, file, 0);
file->destroy(file);
stats.bytes_read += filesize;
@@ -415,6 +414,7 @@ int main(int argc, char **argv)
sqfs_compressor_t *cmp;
sqfs_id_table_t *idtbl;
sqfs_file_t *outfile;
+ sqfs_super_t super;
fstree_t fs;
int ret;