diff options
-rw-r--r-- | archival/libarchive/Kbuild.src | 1 | ||||
-rw-r--r-- | archival/unzip.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/archival/libarchive/Kbuild.src b/archival/libarchive/Kbuild.src index 84117fa85..eaf67451f 100644 --- a/archival/libarchive/Kbuild.src +++ b/archival/libarchive/Kbuild.src | |||
@@ -61,6 +61,7 @@ lib-$(CONFIG_FEATURE_UNZIP_LZMA) += open_transformer.o decompress_unlzma. | |||
61 | lib-$(CONFIG_UNXZ) += open_transformer.o decompress_unxz.o | 61 | lib-$(CONFIG_UNXZ) += open_transformer.o decompress_unxz.o |
62 | lib-$(CONFIG_XZCAT) += open_transformer.o decompress_unxz.o | 62 | lib-$(CONFIG_XZCAT) += open_transformer.o decompress_unxz.o |
63 | lib-$(CONFIG_XZ) += open_transformer.o decompress_unxz.o | 63 | lib-$(CONFIG_XZ) += open_transformer.o decompress_unxz.o |
64 | lib-$(CONFIG_FEATURE_UNZIP_XZ) += open_transformer.o decompress_unxz.o | ||
64 | lib-$(CONFIG_GUNZIP) += open_transformer.o decompress_gunzip.o | 65 | lib-$(CONFIG_GUNZIP) += open_transformer.o decompress_gunzip.o |
65 | lib-$(CONFIG_ZCAT) += open_transformer.o decompress_gunzip.o | 66 | lib-$(CONFIG_ZCAT) += open_transformer.o decompress_gunzip.o |
66 | lib-$(CONFIG_UNCOMPRESS) += open_transformer.o decompress_uncompress.o | 67 | lib-$(CONFIG_UNCOMPRESS) += open_transformer.o decompress_uncompress.o |
diff --git a/archival/unzip.c b/archival/unzip.c index 997543c50..6dc5d89c2 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -46,6 +46,11 @@ | |||
46 | //config: bool "Support compression method 14 (lzma)" | 46 | //config: bool "Support compression method 14 (lzma)" |
47 | //config: default y | 47 | //config: default y |
48 | //config: depends on FEATURE_UNZIP_CDF && DESKTOP | 48 | //config: depends on FEATURE_UNZIP_CDF && DESKTOP |
49 | //config: | ||
50 | //config:config FEATURE_UNZIP_XZ | ||
51 | //config: bool "Support compression method 95 (xz)" | ||
52 | //config: default y | ||
53 | //config: depends on FEATURE_UNZIP_CDF && DESKTOP | ||
49 | 54 | ||
50 | //applet:IF_UNZIP(APPLET(unzip, BB_DIR_USR_BIN, BB_SUID_DROP)) | 55 | //applet:IF_UNZIP(APPLET(unzip, BB_DIR_USR_BIN, BB_SUID_DROP)) |
51 | //kbuild:lib-$(CONFIG_UNZIP) += unzip.o | 56 | //kbuild:lib-$(CONFIG_UNZIP) += unzip.o |
@@ -372,6 +377,14 @@ static void unzip_extract(zip_header_t *zip, int dst_fd) | |||
372 | bb_error_msg_and_die("inflate error"); | 377 | bb_error_msg_and_die("inflate error"); |
373 | } | 378 | } |
374 | #endif | 379 | #endif |
380 | #if ENABLE_FEATURE_UNZIP_XZ | ||
381 | else if (zip->fmt.method == 95) { | ||
382 | /* Not tested yet */ | ||
383 | xstate.bytes_out = unpack_xz_stream(&xstate); | ||
384 | if (xstate.bytes_out < 0) | ||
385 | bb_error_msg_and_die("inflate error"); | ||
386 | } | ||
387 | #endif | ||
375 | else { | 388 | else { |
376 | bb_error_msg_and_die("unsupported method %u", zip->fmt.method); | 389 | bb_error_msg_and_die("unsupported method %u", zip->fmt.method); |
377 | } | 390 | } |