aboutsummaryrefslogtreecommitdiff
path: root/archival/bzip2.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/bzip2.c')
-rw-r--r--archival/bzip2.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/archival/bzip2.c b/archival/bzip2.c
index 47fa29af3..7e38e78b3 100644
--- a/archival/bzip2.c
+++ b/archival/bzip2.c
@@ -19,6 +19,15 @@
//config:
//config: Unless you have a specific application which requires bzip2, you
//config: should probably say N here.
+//config:
+//config:config FEATURE_BZIP2_DECOMPRESS
+//config: bool "Enable decompression"
+//config: default y
+//config: depends on BZIP2 || BUNZIP2 || BZCAT
+//config: help
+//config: Enable -d (--decompress) and -t (--test) options for bzip2.
+//config: This will be automatically selected if bunzip2 or bzcat is
+//config: enabled.
//applet:IF_BZIP2(APPLET(bzip2, BB_DIR_USR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_BZIP2) += bzip2.o
@@ -28,7 +37,10 @@
//usage:#define bzip2_full_usage "\n\n"
//usage: "Compress FILEs (or stdin) with bzip2 algorithm\n"
//usage: "\n -1..9 Compression level"
+//usage: IF_FEATURE_BZIP2_DECOMPRESS(
//usage: "\n -d Decompress"
+//usage: "\n -t Test file integrity"
+//usage: )
//usage: "\n -c Write to stdout"
//usage: "\n -f Force"
@@ -184,8 +196,8 @@ int bzip2_main(int argc UNUSED_PARAM, char **argv)
opt_complementary = "s2"; /* -s means -2 (compatibility) */
/* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */
- opt = getopt32(argv, "cfv" IF_BUNZIP2("dt") "123456789qzs");
-#if ENABLE_BUNZIP2 /* bunzip2_main may not be visible... */
+ opt = getopt32(argv, "cfv" IF_FEATURE_BZIP2_DECOMPRESS("dt") "123456789qzs");
+#if ENABLE_FEATURE_BZIP2_DECOMPRESS /* bunzip2_main may not be visible... */
if (opt & 0x18) // -d and/or -t
return bunzip2_main(argc, argv);
opt >>= 5;