aboutsummaryrefslogtreecommitdiff
path: root/archival/gzip.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-27 21:52:41 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-27 21:52:41 +0000
commit55da0be405bf4246ceb644b17b91d2686a9f1399 (patch)
tree4abe047d8dbbe365cf6d20d7def5ba512453e508 /archival/gzip.c
parent3dee8e2bac464eb66b14ac42806c8611b6fb6a19 (diff)
downloadbusybox-55da0be405bf4246ceb644b17b91d2686a9f1399.tar.gz
support gzip -t and bzip2 -t
Diffstat (limited to 'archival/gzip.c')
-rw-r--r--archival/gzip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index dce40ec92..5c9d6b3b2 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -2049,9 +2049,9 @@ int gzip_main(int argc ATTRIBUTE_UNUSED, char **argv)
unsigned opt;
/* Must match bbunzip's constants OPT_STDOUT, OPT_FORCE! */
- opt = getopt32(argv, "cfv" USE_GUNZIP("d") "q123456789n" );
+ opt = getopt32(argv, "cfv" USE_GUNZIP("dt") "q123456789n");
#if ENABLE_GUNZIP /* gunzip_main may not be visible... */
- if (opt & 0x8) // -d
+ if (opt & 0x18) // -d and/or -t
return gunzip_main(argc, argv);
#endif
option_mask32 &= 0x7; /* ignore -q, -0..9 */
@@ -2062,6 +2062,7 @@ int gzip_main(int argc ATTRIBUTE_UNUSED, char **argv)
SET_PTR_TO_GLOBALS(xzalloc(sizeof(struct globals) + sizeof(struct globals2))
+ sizeof(struct globals));
+ barrier();
G2.l_desc.dyn_tree = G2.dyn_ltree;
G2.l_desc.static_tree = G2.static_ltree;
G2.l_desc.extra_bits = extra_lbits;