aboutsummaryrefslogtreecommitdiff
path: root/bin/sqfs2tar/options.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-12-13 09:15:19 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-01-19 16:24:56 +0100
commit551dd3879c288a2b6b6fbaca5c09c04fbe994ff4 (patch)
treef3437139699edffd034168999854258f30c4023b /bin/sqfs2tar/options.c
parent722ecf27eaf83685dfc6e92adc9d66f0107da5ea (diff)
Split stream compression out of libio
Move it to a separate libxfrm library, where it can be independently tested as well. The bulk of the new code is also mainly test cases for the compressors. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin/sqfs2tar/options.c')
-rw-r--r--bin/sqfs2tar/options.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/bin/sqfs2tar/options.c b/bin/sqfs2tar/options.c
index 4f783e0..ba1588d 100644
--- a/bin/sqfs2tar/options.c
+++ b/bin/sqfs2tar/options.c
@@ -91,19 +91,12 @@ void process_args(int argc, char **argv)
switch (i) {
case 'c':
- compressor = io_compressor_id_from_name(optarg);
+ compressor = xfrm_compressor_id_from_name(optarg);
if (compressor <= 0) {
fprintf(stderr, "unknown compressor '%s'.\n",
optarg);
goto fail;
}
-
- if (!io_compressor_exists(compressor)) {
- fprintf(stderr,
- "%s compressor is not supported.\n",
- optarg);
- goto fail;
- }
break;
case 'd':
if (num_subdirs == max_subdirs) {
@@ -163,11 +156,11 @@ void process_args(int argc, char **argv)
case 'h':
fputs(usagestr, stdout);
- i = IO_COMPRESSOR_MIN;
+ i = XFRM_COMPRESSOR_MIN;
- while (i <= IO_COMPRESSOR_MAX) {
- name = io_compressor_name_from_id(i);
- if (io_compressor_exists(i))
+ while (i <= XFRM_COMPRESSOR_MAX) {
+ name = xfrm_compressor_name_from_id(i);
+ if (name != NULL)
printf("\t%s\n", name);
++i;
}