aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-05-27 18:01:42 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-05-27 18:01:42 +0200
commit20cc390b9bb33cd0ab05c8bbfcd24babad7ec204 (patch)
tree876974f2abe0ae0213e5707fb551af70b73665cd /archival
parentbae3abf2c7185f0a9145ed2c97abb2d2e7bc2b40 (diff)
downloadbusybox-w32-20cc390b9bb33cd0ab05c8bbfcd24babad7ec204.tar.gz
busybox-w32-20cc390b9bb33cd0ab05c8bbfcd24babad7ec204.tar.bz2
busybox-w32-20cc390b9bb33cd0ab05c8bbfcd24babad7ec204.zip
post-1.14.0 fixes
hush significantly updated. fixes for acpid, awk, depmod, dhcp, gzip, mdev, modprobe, sysctl. libbb fixes. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r--archival/gzip.c68
1 files changed, 31 insertions, 37 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index 43804b2e4..a76e1d3bd 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -389,19 +389,6 @@ static void put_32bit(ulg n)
389} 389}
390 390
391/* =========================================================================== 391/* ===========================================================================
392 * Clear input and output buffers
393 */
394static void clear_bufs(void)
395{
396 G1.outcnt = 0;
397#ifdef DEBUG
398 G1.insize = 0;
399#endif
400 G1.isize = 0;
401}
402
403
404/* ===========================================================================
405 * Run a set of bytes through the crc shift register. If s is a NULL 392 * Run a set of bytes through the crc shift register. If s is a NULL
406 * pointer, then initialize the crc shift register contents instead. 393 * pointer, then initialize the crc shift register contents instead.
407 * Return the current crc in either case. 394 * Return the current crc in either case.
@@ -2019,7 +2006,37 @@ USE_DESKTOP(long long) int pack_gzip(unpack_info_t *info UNUSED_PARAM)
2019{ 2006{
2020 struct stat s; 2007 struct stat s;
2021 2008
2022 clear_bufs(); 2009 /* Clear input and output buffers */
2010 G1.outcnt = 0;
2011#ifdef DEBUG
2012 G1.insize = 0;
2013#endif
2014 G1.isize = 0;
2015
2016 /* Reinit G2.xxx */
2017 memset(&G2, 0, sizeof(G2));
2018 G2.l_desc.dyn_tree = G2.dyn_ltree;
2019 G2.l_desc.static_tree = G2.static_ltree;
2020 G2.l_desc.extra_bits = extra_lbits;
2021 G2.l_desc.extra_base = LITERALS + 1;
2022 G2.l_desc.elems = L_CODES;
2023 G2.l_desc.max_length = MAX_BITS;
2024 //G2.l_desc.max_code = 0;
2025 G2.d_desc.dyn_tree = G2.dyn_dtree;
2026 G2.d_desc.static_tree = G2.static_dtree;
2027 G2.d_desc.extra_bits = extra_dbits;
2028 //G2.d_desc.extra_base = 0;
2029 G2.d_desc.elems = D_CODES;
2030 G2.d_desc.max_length = MAX_BITS;
2031 //G2.d_desc.max_code = 0;
2032 G2.bl_desc.dyn_tree = G2.bl_tree;
2033 //G2.bl_desc.static_tree = NULL;
2034 G2.bl_desc.extra_bits = extra_blbits,
2035 //G2.bl_desc.extra_base = 0;
2036 G2.bl_desc.elems = BL_CODES;
2037 G2.bl_desc.max_length = MAX_BL_BITS;
2038 //G2.bl_desc.max_code = 0;
2039
2023 s.st_ctime = 0; 2040 s.st_ctime = 0;
2024 fstat(STDIN_FILENO, &s); 2041 fstat(STDIN_FILENO, &s);
2025 zip(s.st_ctime); 2042 zip(s.st_ctime);
@@ -2064,29 +2081,6 @@ int gzip_main(int argc UNUSED_PARAM, char **argv)
2064 SET_PTR_TO_GLOBALS(xzalloc(sizeof(struct globals) + sizeof(struct globals2)) 2081 SET_PTR_TO_GLOBALS(xzalloc(sizeof(struct globals) + sizeof(struct globals2))
2065 + sizeof(struct globals)); 2082 + sizeof(struct globals));
2066 barrier(); 2083 barrier();
2067 G2.l_desc.dyn_tree = G2.dyn_ltree;
2068 G2.l_desc.static_tree = G2.static_ltree;
2069 G2.l_desc.extra_bits = extra_lbits;
2070 G2.l_desc.extra_base = LITERALS + 1;
2071 G2.l_desc.elems = L_CODES;
2072 G2.l_desc.max_length = MAX_BITS;
2073 //G2.l_desc.max_code = 0;
2074
2075 G2.d_desc.dyn_tree = G2.dyn_dtree;
2076 G2.d_desc.static_tree = G2.static_dtree;
2077 G2.d_desc.extra_bits = extra_dbits;
2078 //G2.d_desc.extra_base = 0;
2079 G2.d_desc.elems = D_CODES;
2080 G2.d_desc.max_length = MAX_BITS;
2081 //G2.d_desc.max_code = 0;
2082
2083 G2.bl_desc.dyn_tree = G2.bl_tree;
2084 //G2.bl_desc.static_tree = NULL;
2085 G2.bl_desc.extra_bits = extra_blbits,
2086 //G2.bl_desc.extra_base = 0;
2087 G2.bl_desc.elems = BL_CODES;
2088 G2.bl_desc.max_length = MAX_BL_BITS;
2089 //G2.bl_desc.max_code = 0;
2090 2084
2091 /* Allocate all global buffers (for DYN_ALLOC option) */ 2085 /* Allocate all global buffers (for DYN_ALLOC option) */
2092 ALLOC(uch, G1.l_buf, INBUFSIZ); 2086 ALLOC(uch, G1.l_buf, INBUFSIZ);