summaryrefslogtreecommitdiff
path: root/tar/sqfs2tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'tar/sqfs2tar.c')
-rw-r--r--tar/sqfs2tar.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tar/sqfs2tar.c b/tar/sqfs2tar.c
index 77f4843..9a12a96 100644
--- a/tar/sqfs2tar.c
+++ b/tar/sqfs2tar.c
@@ -420,7 +420,14 @@ int main(int argc, char **argv)
goto out_fd;
}
- if (!sqfs_compressor_exists(super.compression_id)) {
+ ret = sqfs_compressor_exists(super.compression_id);
+
+#ifdef WITH_LZO
+ if (super.compression_id == SQFS_COMP_LZO)
+ ret = true;
+#endif
+
+ if (!ret) {
fprintf(stderr, "%s: unknown compressor used.\n", filename);
goto out_fd;
}
@@ -430,6 +437,12 @@ int main(int argc, char **argv)
SQFS_COMP_FLAG_UNCOMPRESS);
cmp = sqfs_compressor_create(&cfg);
+
+#ifdef WITH_LZO
+ if (super.compression_id == SQFS_COMP_LZO && cmp == NULL)
+ cmp = lzo_compressor_create(&cfg);
+#endif
+
if (cmp == NULL) {
fputs("Error creating compressor.\n", stderr);
goto out_fd;