aboutsummaryrefslogtreecommitdiff
path: root/bin/sqfs2tar
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sqfs2tar')
-rw-r--r--bin/sqfs2tar/Makemodule.am2
-rw-r--r--bin/sqfs2tar/options.c17
-rw-r--r--bin/sqfs2tar/sqfs2tar.c10
-rw-r--r--bin/sqfs2tar/sqfs2tar.h1
4 files changed, 15 insertions, 15 deletions
diff --git a/bin/sqfs2tar/Makemodule.am b/bin/sqfs2tar/Makemodule.am
index 22d523e..05cee5b 100644
--- a/bin/sqfs2tar/Makemodule.am
+++ b/bin/sqfs2tar/Makemodule.am
@@ -3,7 +3,7 @@ sqfs2tar_SOURCES += bin/sqfs2tar/options.c bin/sqfs2tar/write_tree.c
sqfs2tar_SOURCES += bin/sqfs2tar/xattr.c
sqfs2tar_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
sqfs2tar_LDADD = libcommon.a libutil.a libsquashfs.la libtar.a
-sqfs2tar_LDADD += libio.a libcompat.a libfstree.a
+sqfs2tar_LDADD += libio.a libxfrm.a libcompat.a libfstree.a
sqfs2tar_LDADD += $(ZLIB_LIBS) $(XZ_LIBS) $(LZO_LIBS) $(ZSTD_LIBS) $(BZIP2_LIBS)
sqfs2tar_LDADD += $(PTHREAD_LIBS)
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;
}
diff --git a/bin/sqfs2tar/sqfs2tar.c b/bin/sqfs2tar/sqfs2tar.c
index f8d3173..43f9e78 100644
--- a/bin/sqfs2tar/sqfs2tar.c
+++ b/bin/sqfs2tar/sqfs2tar.c
@@ -124,9 +124,15 @@ int main(int argc, char **argv)
}
if (compressor > 0) {
- ostream_t *strm = ostream_compressor_create(out_file,
- compressor);
+ xfrm_stream_t *xfrm = compressor_stream_create(compressor,NULL);
+ ostream_t *strm;
+
+ if (xfrm == NULL)
+ goto out;
+
+ strm = ostream_xfrm_create(out_file, xfrm);
sqfs_drop(out_file);
+ sqfs_drop(xfrm);
out_file = strm;
if (out_file == NULL)
diff --git a/bin/sqfs2tar/sqfs2tar.h b/bin/sqfs2tar/sqfs2tar.h
index 71b491d..4bf5428 100644
--- a/bin/sqfs2tar/sqfs2tar.h
+++ b/bin/sqfs2tar/sqfs2tar.h
@@ -12,6 +12,7 @@
#include "util/util.h"
#include "tar/tar.h"
+#include "xfrm/compress.h"
#include "io/xfrm.h"
#include <getopt.h>