aboutsummaryrefslogtreecommitdiff
path: root/mkfs/mkfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'mkfs/mkfs.h')
-rw-r--r--mkfs/mkfs.h25
1 files changed, 15 insertions, 10 deletions
diff --git a/mkfs/mkfs.h b/mkfs/mkfs.h
index fe4123b..63bfc10 100644
--- a/mkfs/mkfs.h
+++ b/mkfs/mkfs.h
@@ -35,19 +35,13 @@ typedef struct {
char *comp_extra;
} options_t;
+typedef struct data_writer_t data_writer_t;
+
typedef struct {
int outfd;
options_t opt;
sqfs_super_t super;
fstree_t fs;
- void *block;
- void *fragment;
- void *scratch;
-
- sqfs_fragment_t *fragments;
- size_t num_fragments;
- size_t max_fragments;
- size_t frag_offset;
id_table_t idtbl;
@@ -56,8 +50,19 @@ typedef struct {
void process_command_line(options_t *opt, int argc, char **argv);
-int write_data_to_image(sqfs_info_t *info);
-
int write_xattr(sqfs_info_t *info);
+data_writer_t *data_writer_create(sqfs_super_t *super, compressor_t *cmp,
+ int outfd);
+
+void data_writer_destroy(data_writer_t *data);
+
+int data_writer_write_fragment_table(data_writer_t *data);
+
+int write_data_from_fd(data_writer_t *data, file_info_t *fi, int infd);
+
+int data_writer_flush_fragments(data_writer_t *data);
+
+int write_data_to_image(data_writer_t *data, sqfs_info_t *info);
+
#endif /* MKFS_H */