From 307107ecd2fc3ffbf6fe91497daf767700f3572f Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 1 Sep 2019 22:42:49 +0200 Subject: Move command line processing stuff out of compressor code This commit moves stuff like printing help text, command line option processing and enumerating available processors on stdout out of the generic compressor code. The option string is replaced with a structure that directly exposese the tweakable parameters for all compressors. A function for parsing the command line arguments into this structure is added in sqfshelper. Signed-off-by: David Oberhollenzer --- include/highlevel.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/highlevel.h') diff --git a/include/highlevel.h b/include/highlevel.h index b9d9339..6b8e2e2 100644 --- a/include/highlevel.h +++ b/include/highlevel.h @@ -141,4 +141,13 @@ int meta_writer_write_dir(meta_writer_t *dm, dir_info_t *dir, int meta_writer_write_inode(fstree_t *fs, id_table_t *idtbl, meta_writer_t *im, meta_writer_t *dm, tree_node_t *node); +void compressor_print_available(void); + +E_SQFS_COMPRESSOR compressor_get_default(void); + +int compressor_cfg_init_options(compressor_config_t *cfg, E_SQFS_COMPRESSOR id, + size_t block_size, char *options); + +void compressor_print_help(E_SQFS_COMPRESSOR id); + #endif /* HIGHLEVEL_H */ -- cgit v1.2.3