aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
Diffstat (limited to 'archival')
-rw-r--r--archival/Config.in22
-rw-r--r--archival/Makefile2
-rw-r--r--archival/Makefile.in2
-rw-r--r--archival/ar.c4
-rw-r--r--archival/cpio.c4
-rw-r--r--archival/dpkg.c84
-rw-r--r--archival/dpkg_deb.c4
-rw-r--r--archival/gunzip.c6
-rw-r--r--archival/gzip.c6
-rw-r--r--archival/libunarchive/Makefile2
-rw-r--r--archival/libunarchive/Makefile.in6
-rw-r--r--archival/libunarchive/data_extract_all.c4
-rw-r--r--archival/libunarchive/decompress_bunzip2.c2
-rw-r--r--archival/libunarchive/decompress_uncompress.c2
-rw-r--r--archival/libunarchive/decompress_unzip.c32
-rw-r--r--archival/libunarchive/filter_accept_list_reassign.c2
-rw-r--r--archival/libunarchive/get_header_ar.c2
-rw-r--r--archival/libunarchive/get_header_cpio.c6
-rw-r--r--archival/libunarchive/get_header_tar.c4
-rw-r--r--archival/libunarchive/uncompress.c2
-rw-r--r--archival/libunarchive/unzip.c32
-rw-r--r--archival/rpm.c4
-rw-r--r--archival/rpm2cpio.c2
-rw-r--r--archival/tar.c22
24 files changed, 129 insertions, 129 deletions
diff --git a/archival/Config.in b/archival/Config.in
index daf3cf221..db358db08 100644
--- a/archival/Config.in
+++ b/archival/Config.in
@@ -46,11 +46,11 @@ config CONFIG_BUNZIP2
46 sorting text compression algorithm, and Huffman coding. Compression 46 sorting text compression algorithm, and Huffman coding. Compression
47 is generally considerably better than that achieved by more 47 is generally considerably better than that achieved by more
48 conventional LZ77/LZ78-based compressors, and approaches the 48 conventional LZ77/LZ78-based compressors, and approaches the
49 performance of the PPM family of statistical compressors. 49 performance of the PPM family of statistical compressors.
50 50
51 The BusyBox bunzip2 applet is limited to de-compression only. 51 The BusyBox bunzip2 applet is limited to de-compression only.
52 On an x86 system, this applet adds about 11K. 52 On an x86 system, this applet adds about 11K.
53 53
54 Unless you have a specific application which requires bunzip2, you 54 Unless you have a specific application which requires bunzip2, you
55 should probably say N here. 55 should probably say N here.
56 56
@@ -63,7 +63,7 @@ config CONFIG_CPIO
63 cpio has 110 bytes of overheads for every stored file. 63 cpio has 110 bytes of overheads for every stored file.
64 64
65 This implementation of cpio can extract cpio archives created in the 65 This implementation of cpio can extract cpio archives created in the
66 "newc" or "crc" format, it cannot create or modify them. 66 "newc" or "crc" format, it cannot create or modify them.
67 67
68 Unless you have a specific application which requires cpio, you should 68 Unless you have a specific application which requires cpio, you should
69 probably say N here. 69 probably say N here.
@@ -73,7 +73,7 @@ config CONFIG_DPKG
73 default n 73 default n
74 help 74 help
75 dpkg is a medium-level tool to install, build, remove and manage Debian packages. 75 dpkg is a medium-level tool to install, build, remove and manage Debian packages.
76 76
77 This implementation of dpkg has a number of limitations, you should use the 77 This implementation of dpkg has a number of limitations, you should use the
78 official dpkg if possible. 78 official dpkg if possible.
79 79
@@ -82,9 +82,9 @@ config CONFIG_DPKG_DEB
82 default n 82 default n
83 help 83 help
84 dpkg-deb packs, unpacks and provides information about Debian archives. 84 dpkg-deb packs, unpacks and provides information about Debian archives.
85 85
86 This implementation of dpkg-deb cannot pack archives. 86 This implementation of dpkg-deb cannot pack archives.
87 87
88 Unless you have a specific application which requires dpkg-deb, you should 88 Unless you have a specific application which requires dpkg-deb, you should
89 probably say N here. 89 probably say N here.
90 90
@@ -94,7 +94,7 @@ config CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY
94 depends on CONFIG_DPKG_DEB 94 depends on CONFIG_DPKG_DEB
95 help 95 help
96 This reduces dpkg-deb to the equivalent of "ar -p <deb> data.tar.gz | tar -zx". 96 This reduces dpkg-deb to the equivalent of "ar -p <deb> data.tar.gz | tar -zx".
97 However it saves space as none of the extra dpkg-deb, ar or tar options are 97 However it saves space as none of the extra dpkg-deb, ar or tar options are
98 needed, they are linked to internally. 98 needed, they are linked to internally.
99 99
100config CONFIG_GUNZIP 100config CONFIG_GUNZIP
@@ -195,7 +195,7 @@ config CONFIG_FEATURE_TAR_GNU_EXTENSIONS
195 default y 195 default y
196 depends on CONFIG_TAR 196 depends on CONFIG_TAR
197 help 197 help
198 With this option busybox supports GNU long filenames and 198 With this option busybox supports GNU long filenames and
199 linknames. 199 linknames.
200 200
201config CONFIG_FEATURE_TAR_LONG_OPTIONS 201config CONFIG_FEATURE_TAR_LONG_OPTIONS
@@ -241,7 +241,7 @@ config CONFIG_FEATURE_DEB_TAR_GZ
241 depends on CONFIG_DPKG || CONFIG_DPKG_DEB 241 depends on CONFIG_DPKG || CONFIG_DPKG_DEB
242 help 242 help
243 This is the default compression method inside the debian ar file. 243 This is the default compression method inside the debian ar file.
244 244
245 If you want compatibility with standard .deb's you should say yes here. 245 If you want compatibility with standard .deb's you should say yes here.
246 246
247config CONFIG_FEATURE_DEB_TAR_BZ2 247config CONFIG_FEATURE_DEB_TAR_BZ2
@@ -251,7 +251,7 @@ config CONFIG_FEATURE_DEB_TAR_BZ2
251 help 251 help
252 This allows dpkg and dpkg-deb to extract deb's that are compressed internally 252 This allows dpkg and dpkg-deb to extract deb's that are compressed internally
253 with bzip2 instead of gzip. 253 with bzip2 instead of gzip.
254 254
255 You only want this if you are creating your own custom debian packages that 255 You only want this if you are creating your own custom debian packages that
256 use an internal control.tar.bz2 or data.tar.bz2. 256 use an internal control.tar.bz2 or data.tar.bz2.
257 257
diff --git a/archival/Makefile b/archival/Makefile
index 3362feafb..1cbe7ee00 100644
--- a/archival/Makefile
+++ b/archival/Makefile
@@ -1,6 +1,6 @@
1# Makefile for busybox 1# Makefile for busybox
2# 2#
3# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> 3# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
4# 4#
5# This program is free software; you can redistribute it and/or modify 5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by 6# it under the terms of the GNU General Public License as published by
diff --git a/archival/Makefile.in b/archival/Makefile.in
index 3247ad8bd..1673662f9 100644
--- a/archival/Makefile.in
+++ b/archival/Makefile.in
@@ -1,6 +1,6 @@
1# Makefile for busybox 1# Makefile for busybox
2# 2#
3# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> 3# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
4# 4#
5# This program is free software; you can redistribute it and/or modify 5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by 6# it under the terms of the GNU General Public License as published by
diff --git a/archival/ar.c b/archival/ar.c
index 890e81fc5..ddf3fdadb 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -1,10 +1,10 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * Mini ar implementation for busybox 3 * Mini ar implementation for busybox
4 * 4 *
5 * Copyright (C) 2000 by Glenn McGrath 5 * Copyright (C) 2000 by Glenn McGrath
6 * Written by Glenn McGrath <bug1@optushome.com.au> 1 June 2000 6 * Written by Glenn McGrath <bug1@optushome.com.au> 1 June 2000
7 * 7 *
8 * Based in part on BusyBox tar, Debian dpkg-deb and GNU ar. 8 * Based in part on BusyBox tar, Debian dpkg-deb and GNU ar.
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
diff --git a/archival/cpio.c b/archival/cpio.c
index 8f85779c9..aff6a55f9 100644
--- a/archival/cpio.c
+++ b/archival/cpio.c
@@ -2,7 +2,7 @@
2/* 2/*
3 * Mini cpio implementation for busybox 3 * Mini cpio implementation for busybox
4 * 4 *
5 * Copyright (C) 2001 by Glenn McGrath 5 * Copyright (C) 2001 by Glenn McGrath
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
@@ -62,7 +62,7 @@ extern int cpio_main(int argc, char **argv)
62 /* if both extract and test option are given, ignore extract option */ 62 /* if both extract and test option are given, ignore extract option */
63 if (opt & CPIO_OPT_EXTRACT) { 63 if (opt & CPIO_OPT_EXTRACT) {
64 opt &= ~CPIO_OPT_EXTRACT; 64 opt &= ~CPIO_OPT_EXTRACT;
65 } 65 }
66 archive_handle->action_header = header_list; 66 archive_handle->action_header = header_list;
67 } 67 }
68 if (opt & CPIO_OPT_EXTRACT) { 68 if (opt & CPIO_OPT_EXTRACT) {
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 2ebbbdf4e..e192b4a62 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -4,7 +4,7 @@
4 * 4 *
5 * Written By Glenn McGrath with the help of others 5 * Written By Glenn McGrath with the help of others
6 * Copyright (C) 2001 by Glenn McGrath 6 * Copyright (C) 2001 by Glenn McGrath
7 * 7 *
8 * Started life as a busybox implementation of udpkg 8 * Started life as a busybox implementation of udpkg
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
@@ -54,7 +54,7 @@
54 * int's and chaos is assured, 16381 is the max prime for 14 bit field 54 * int's and chaos is assured, 16381 is the max prime for 14 bit field
55 */ 55 */
56 56
57/* NAME_HASH_PRIME, Stores package names and versions, 57/* NAME_HASH_PRIME, Stores package names and versions,
58 * I estimate it should be at least 50% bigger than PACKAGE_HASH_PRIME, 58 * I estimate it should be at least 50% bigger than PACKAGE_HASH_PRIME,
59 * as there a lot of duplicate version numbers */ 59 * as there a lot of duplicate version numbers */
60#define NAME_HASH_PRIME 16381 60#define NAME_HASH_PRIME 16381
@@ -150,7 +150,7 @@ void make_hash(const char *key, unsigned int *start, unsigned int *decrement, co
150 * shift amount is mod 24 because long int is 32 bit and data 150 * shift amount is mod 24 because long int is 32 bit and data
151 * to be shifted is 8, dont want to shift data to where it has 151 * to be shifted is 8, dont want to shift data to where it has
152 * no effect*/ 152 * no effect*/
153 hash_num += ((key[i] + key[i-1]) << ((key[i] * i) % 24)); 153 hash_num += ((key[i] + key[i-1]) << ((key[i] * i) % 24));
154 } 154 }
155 *start = (unsigned int) hash_num % hash_prime; 155 *start = (unsigned int) hash_num % hash_prime;
156 *decrement = (unsigned int) 1 + (hash_num % (hash_prime - 1)); 156 *decrement = (unsigned int) 1 + (hash_num % (hash_prime - 1));
@@ -464,11 +464,11 @@ void add_split_dependencies(common_node_t *parent_node, const char *whole_line,
464 } else { 464 } else {
465 or_edge = NULL; 465 or_edge = NULL;
466 } 466 }
467 467
468 if ( or_edge ) { 468 if ( or_edge ) {
469 or_edge->name = search_name_hashtable(field); 469 or_edge->name = search_name_hashtable(field);
470 or_edge->version = 0; // tracks the number of altenatives 470 or_edge->version = 0; // tracks the number of altenatives
471 471
472 add_edge_to_node(parent_node, or_edge); 472 add_edge_to_node(parent_node, or_edge);
473 } 473 }
474 474
@@ -572,7 +572,7 @@ unsigned int fill_package_struct(char *control_buffer)
572 goto fill_package_struct_cleanup; /* Oh no, the dreaded goto statement ! */ 572 goto fill_package_struct_cleanup; /* Oh no, the dreaded goto statement ! */
573 } 573 }
574 574
575 field_num = compare_string_array(field_names, field_name); 575 field_num = compare_string_array(field_names, field_name);
576 switch(field_num) { 576 switch(field_num) {
577 case 0: /* Package */ 577 case 0: /* Package */
578 new_node->name = search_name_hashtable(field_value); 578 new_node->name = search_name_hashtable(field_value);
@@ -697,7 +697,7 @@ const char *describe_status(int status_num) {
697 return "is marked to be removed"; 697 return "is marked to be removed";
698 if ( status_want == search_name_hashtable("purge") ) 698 if ( status_want == search_name_hashtable("purge") )
699 return "is marked to be purged"; 699 return "is marked to be purged";
700 } 700 }
701 if ( status_want == search_name_hashtable("unknown") ) 701 if ( status_want == search_name_hashtable("unknown") )
702 return "is in an indeterminate state"; 702 return "is in an indeterminate state";
703 if ( status_want == search_name_hashtable("install") ) 703 if ( status_want == search_name_hashtable("install") )
@@ -957,11 +957,11 @@ void write_status_file(deb_file_t **deb_file)
957 957
958 /* Create a seperate backfile to dpkg */ 958 /* Create a seperate backfile to dpkg */
959 if (rename("/var/lib/dpkg/status", "/var/lib/dpkg/status.udeb.bak") == -1) { 959 if (rename("/var/lib/dpkg/status", "/var/lib/dpkg/status.udeb.bak") == -1) {
960 struct stat stat_buf; 960 struct stat stat_buf;
961 if (stat("/var/lib/dpkg/status", &stat_buf) == 0) { 961 if (stat("/var/lib/dpkg/status", &stat_buf) == 0) {
962 bb_error_msg_and_die("Couldnt create backup status file"); 962 bb_error_msg_and_die("Couldnt create backup status file");
963 } 963 }
964 /* Its ok if renaming the status file fails becasue status 964 /* Its ok if renaming the status file fails becasue status
965 * file doesnt exist, maybe we are starting from scratch */ 965 * file doesnt exist, maybe we are starting from scratch */
966 bb_error_msg("No status file found, creating new one"); 966 bb_error_msg("No status file found, creating new one");
967 } 967 }
@@ -1056,10 +1056,10 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
1056 const edge_t *package_edge = package_node->edge[j]; 1056 const edge_t *package_edge = package_node->edge[j];
1057 1057
1058 if (package_edge->type == EDGE_CONFLICTS) { 1058 if (package_edge->type == EDGE_CONFLICTS) {
1059 const unsigned int package_num = 1059 const unsigned int package_num =
1060 search_package_hashtable(package_edge->name, 1060 search_package_hashtable(package_edge->name,
1061 package_edge->version, 1061 package_edge->version,
1062 package_edge->operator); 1062 package_edge->operator);
1063 int result = 0; 1063 int result = 0;
1064 if (package_hashtable[package_num] != NULL) { 1064 if (package_hashtable[package_num] != NULL) {
1065 status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]); 1065 status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]);
@@ -1078,7 +1078,7 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
1078 } 1078 }
1079 } 1079 }
1080 i++; 1080 i++;
1081 } 1081 }
1082 1082
1083 1083
1084 /* Check dependendcies */ 1084 /* Check dependendcies */
@@ -1098,7 +1098,7 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
1098 1098
1099 /* If there is no status then this package is a 1099 /* If there is no status then this package is a
1100 * virtual one provided by something else. In which 1100 * virtual one provided by something else. In which
1101 * case there are no dependencies to check. 1101 * case there are no dependencies to check.
1102 */ 1102 */
1103 if ( status_hashtable[status_num] == NULL ) continue; 1103 if ( status_hashtable[status_num] == NULL ) continue;
1104 1104
@@ -1125,7 +1125,7 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
1125 for (j = 0; j < package_node->num_of_edges; j++) { 1125 for (j = 0; j < package_node->num_of_edges; j++) {
1126 const edge_t *package_edge = package_node->edge[j]; 1126 const edge_t *package_edge = package_node->edge[j];
1127 unsigned int package_num; 1127 unsigned int package_num;
1128 1128
1129 if ( package_edge->type == EDGE_OR_PRE_DEPENDS || 1129 if ( package_edge->type == EDGE_OR_PRE_DEPENDS ||
1130 package_edge->type == EDGE_OR_DEPENDS ) { /* start an EDGE_OR_ list */ 1130 package_edge->type == EDGE_OR_DEPENDS ) { /* start an EDGE_OR_ list */
1131 number_of_alternatives = package_edge->version; 1131 number_of_alternatives = package_edge->version;
@@ -1147,26 +1147,26 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
1147 * this edge is the right type. 1147 * this edge is the right type.
1148 * 1148 *
1149 * EDGE_DEPENDS == OR_DEPENDS -1 1149 * EDGE_DEPENDS == OR_DEPENDS -1
1150 * EDGE_PRE_DEPENDS == OR_PRE_DEPENDS -1 1150 * EDGE_PRE_DEPENDS == OR_PRE_DEPENDS -1
1151 */ 1151 */
1152 if ( root_of_alternatives && package_edge->type != root_of_alternatives->type - 1) 1152 if ( root_of_alternatives && package_edge->type != root_of_alternatives->type - 1)
1153 bb_error_msg_and_die("Fatal error. Package dependencies corrupt: %d != %d - 1 \n", 1153 bb_error_msg_and_die("Fatal error. Package dependencies corrupt: %d != %d - 1 \n",
1154 package_edge->type, root_of_alternatives->type); 1154 package_edge->type, root_of_alternatives->type);
1155 1155
1156 if (package_hashtable[package_num] != NULL) 1156 if (package_hashtable[package_num] != NULL)
1157 result = !package_satisfies_dependency(package_num, package_edge->type); 1157 result = !package_satisfies_dependency(package_num, package_edge->type);
1158 1158
1159 if (result) { /* check for other package which provide what we are looking for */ 1159 if (result) { /* check for other package which provide what we are looking for */
1160 int provider = -1; 1160 int provider = -1;
1161 1161
1162 while ( (provider = search_for_provides(package_edge->name, provider) ) > -1 ) { 1162 while ( (provider = search_for_provides(package_edge->name, provider) ) > -1 ) {
1163 if ( package_hashtable[provider] == NULL ) { 1163 if ( package_hashtable[provider] == NULL ) {
1164 printf("Have a provider but no package information for it\n"); 1164 printf("Have a provider but no package information for it\n");
1165 continue; 1165 continue;
1166 } 1166 }
1167 result = !package_satisfies_dependency(provider, package_edge->type); 1167 result = !package_satisfies_dependency(provider, package_edge->type);
1168 1168
1169 if ( result == 0 ) 1169 if ( result == 0 )
1170 break; 1170 break;
1171 } 1171 }
1172 } 1172 }
@@ -1176,14 +1176,14 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
1176 if (result && number_of_alternatives == 0) { 1176 if (result && number_of_alternatives == 0) {
1177 if ( root_of_alternatives ) 1177 if ( root_of_alternatives )
1178 bb_error_msg_and_die( 1178 bb_error_msg_and_die(
1179 "Package %s %sdepends on %s, " 1179 "Package %s %sdepends on %s, "
1180 "which cannot be satisfied", 1180 "which cannot be satisfied",
1181 name_hashtable[package_node->name], 1181 name_hashtable[package_node->name],
1182 package_edge->type == EDGE_PRE_DEPENDS ? "pre-" : "", 1182 package_edge->type == EDGE_PRE_DEPENDS ? "pre-" : "",
1183 name_hashtable[root_of_alternatives->name]); 1183 name_hashtable[root_of_alternatives->name]);
1184 else 1184 else
1185 bb_error_msg_and_die( 1185 bb_error_msg_and_die(
1186 "Package %s %sdepends on %s, which %s\n", 1186 "Package %s %sdepends on %s, which %s\n",
1187 name_hashtable[package_node->name], 1187 name_hashtable[package_node->name],
1188 package_edge->type == EDGE_PRE_DEPENDS ? "pre-" : "", 1188 package_edge->type == EDGE_PRE_DEPENDS ? "pre-" : "",
1189 name_hashtable[package_edge->name], 1189 name_hashtable[package_edge->name],
@@ -1192,7 +1192,7 @@ int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
1192 /* we've found a package which 1192 /* we've found a package which
1193 * satisfies the dependency, 1193 * satisfies the dependency,
1194 * so skip over the rest of 1194 * so skip over the rest of
1195 * the alternatives. 1195 * the alternatives.
1196 */ 1196 */
1197 j += number_of_alternatives; 1197 j += number_of_alternatives;
1198 number_of_alternatives = 0; 1198 number_of_alternatives = 0;
@@ -1312,7 +1312,7 @@ char **all_control_list(const char *package_name)
1312 1312
1313void free_array(char **array) 1313void free_array(char **array)
1314{ 1314{
1315 1315
1316 if (array) { 1316 if (array) {
1317 unsigned short i = 0; 1317 unsigned short i = 0;
1318 while (array[i]) { 1318 while (array[i]) {
@@ -1325,7 +1325,7 @@ void free_array(char **array)
1325 1325
1326/* This function lists information on the installed packages. It loops through 1326/* This function lists information on the installed packages. It loops through
1327 * the status_hashtable to retrieve the info. This results in smaller code than 1327 * the status_hashtable to retrieve the info. This results in smaller code than
1328 * scanning the status file. The resulting list, however, is unsorted. 1328 * scanning the status file. The resulting list, however, is unsorted.
1329 */ 1329 */
1330void list_packages(void) 1330void list_packages(void)
1331{ 1331{
@@ -1333,7 +1333,7 @@ void list_packages(void)
1333 1333
1334 printf(" Name Version\n"); 1334 printf(" Name Version\n");
1335 printf("+++-==============-==============\n"); 1335 printf("+++-==============-==============\n");
1336 1336
1337 /* go through status hash, dereference package hash and finally strings */ 1337 /* go through status hash, dereference package hash and finally strings */
1338 for (i=0; i<STATUS_HASH_PRIME+1; i++) { 1338 for (i=0; i<STATUS_HASH_PRIME+1; i++) {
1339 1339
@@ -1342,22 +1342,22 @@ void list_packages(void)
1342 const char *name_str; /* package name */ 1342 const char *name_str; /* package name */
1343 const char *vers_str; /* version */ 1343 const char *vers_str; /* version */
1344 char s1, s2; /* status abbreviations */ 1344 char s1, s2; /* status abbreviations */
1345 int spccnt; /* space count */ 1345 int spccnt; /* space count */
1346 int j; 1346 int j;
1347 1347
1348 stat_str = name_hashtable[status_hashtable[i]->status]; 1348 stat_str = name_hashtable[status_hashtable[i]->status];
1349 name_str = name_hashtable[package_hashtable[status_hashtable[i]->package]->name]; 1349 name_str = name_hashtable[package_hashtable[status_hashtable[i]->package]->name];
1350 vers_str = name_hashtable[package_hashtable[status_hashtable[i]->package]->version]; 1350 vers_str = name_hashtable[package_hashtable[status_hashtable[i]->package]->version];
1351 1351
1352 /* get abbreviation for status field 1 */ 1352 /* get abbreviation for status field 1 */
1353 s1 = stat_str[0] == 'i' ? 'i' : 'r'; 1353 s1 = stat_str[0] == 'i' ? 'i' : 'r';
1354 1354
1355 /* get abbreviation for status field 2 */ 1355 /* get abbreviation for status field 2 */
1356 for (j=0, spccnt=0; stat_str[j] && spccnt<2; j++) { 1356 for (j=0, spccnt=0; stat_str[j] && spccnt<2; j++) {
1357 if (stat_str[j] == ' ') spccnt++; 1357 if (stat_str[j] == ' ') spccnt++;
1358 } 1358 }
1359 s2 = stat_str[j]; 1359 s2 = stat_str[j];
1360 1360
1361 /* print out the line formatted like Debian dpkg */ 1361 /* print out the line formatted like Debian dpkg */
1362 printf("%c%c %-14s %s\n", s1, s2, name_str, vers_str); 1362 printf("%c%c %-14s %s\n", s1, s2, name_str, vers_str);
1363 } 1363 }
@@ -1376,7 +1376,7 @@ void remove_package(const unsigned int package_num, int noisy)
1376 char conffile_name[package_name_length + 30]; 1376 char conffile_name[package_name_length + 30];
1377 int return_value; 1377 int return_value;
1378 1378
1379 if ( noisy ) 1379 if ( noisy )
1380 printf("Removing %s (%s) ...\n", package_name, package_version); 1380 printf("Removing %s (%s) ...\n", package_name, package_version);
1381 1381
1382 /* run prerm script */ 1382 /* run prerm script */
@@ -1464,12 +1464,12 @@ static archive_handle_t *init_archive_deb_ar(const char *filename)
1464{ 1464{
1465 archive_handle_t *ar_handle; 1465 archive_handle_t *ar_handle;
1466 1466
1467 /* Setup an ar archive handle that refers to the gzip sub archive */ 1467 /* Setup an ar archive handle that refers to the gzip sub archive */
1468 ar_handle = init_handle(); 1468 ar_handle = init_handle();
1469 ar_handle->filter = filter_accept_list_reassign; 1469 ar_handle->filter = filter_accept_list_reassign;
1470 ar_handle->src_fd = bb_xopen(filename, O_RDONLY); 1470 ar_handle->src_fd = bb_xopen(filename, O_RDONLY);
1471 1471
1472 return(ar_handle); 1472 return(ar_handle);
1473} 1473}
1474 1474
1475static void init_archive_deb_control(archive_handle_t *ar_handle) 1475static void init_archive_deb_control(archive_handle_t *ar_handle)
@@ -1491,7 +1491,7 @@ static void init_archive_deb_control(archive_handle_t *ar_handle)
1491 /* Assign the tar handle as a subarchive of the ar handle */ 1491 /* Assign the tar handle as a subarchive of the ar handle */
1492 ar_handle->sub_archive = tar_handle; 1492 ar_handle->sub_archive = tar_handle;
1493 1493
1494 return; 1494 return;
1495} 1495}
1496 1496
1497static void init_archive_deb_data(archive_handle_t *ar_handle) 1497static void init_archive_deb_data(archive_handle_t *ar_handle)
@@ -1513,7 +1513,7 @@ static void init_archive_deb_data(archive_handle_t *ar_handle)
1513 /* Assign the tar handle as a subarchive of the ar handle */ 1513 /* Assign the tar handle as a subarchive of the ar handle */
1514 ar_handle->sub_archive = tar_handle; 1514 ar_handle->sub_archive = tar_handle;
1515 1515
1516 return; 1516 return;
1517} 1517}
1518 1518
1519static char *deb_extract_control_file_to_buffer(archive_handle_t *ar_handle, llist_t *myaccept) 1519static char *deb_extract_control_file_to_buffer(archive_handle_t *ar_handle, llist_t *myaccept)
@@ -1586,7 +1586,7 @@ static void unpack_package(deb_file_t *deb_file)
1586 if (run_package_script(package_name, "preinst") != 0) { 1586 if (run_package_script(package_name, "preinst") != 0) {
1587 /* when preinst returns exit code != 0 then quit installation process */ 1587 /* when preinst returns exit code != 0 then quit installation process */
1588 bb_error_msg_and_die("subprocess pre-installation script returned error."); 1588 bb_error_msg_and_die("subprocess pre-installation script returned error.");
1589 } 1589 }
1590 1590
1591 /* Extract data.tar.gz to the root directory */ 1591 /* Extract data.tar.gz to the root directory */
1592 archive_handle = init_archive_deb_ar(deb_file->filename); 1592 archive_handle = init_archive_deb_ar(deb_file->filename);
@@ -1598,7 +1598,7 @@ static void unpack_package(deb_file_t *deb_file)
1598 1598
1599 /* Create the list file */ 1599 /* Create the list file */
1600 strcat(info_prefix, "list"); 1600 strcat(info_prefix, "list");
1601 out_stream = bb_xfopen(info_prefix, "w"); 1601 out_stream = bb_xfopen(info_prefix, "w");
1602 while (archive_handle->sub_archive->passed) { 1602 while (archive_handle->sub_archive->passed) {
1603 /* the leading . has been stripped by data_extract_all_prefix already */ 1603 /* the leading . has been stripped by data_extract_all_prefix already */
1604 fputs(archive_handle->sub_archive->passed->data, out_stream); 1604 fputs(archive_handle->sub_archive->passed->data, out_stream);
@@ -1653,7 +1653,7 @@ int dpkg_main(int argc, char **argv)
1653 case 'F': // equivalent to --force in official dpkg 1653 case 'F': // equivalent to --force in official dpkg
1654 if (strcmp(optarg, "depends") == 0) { 1654 if (strcmp(optarg, "depends") == 0) {
1655 dpkg_opt |= dpkg_opt_force_ignore_depends; 1655 dpkg_opt |= dpkg_opt_force_ignore_depends;
1656 } 1656 }
1657 break; 1657 break;
1658 case 'i': 1658 case 'i':
1659 dpkg_opt |= dpkg_opt_install; 1659 dpkg_opt |= dpkg_opt_install;
@@ -1691,7 +1691,7 @@ int dpkg_main(int argc, char **argv)
1691 list_packages(); 1691 list_packages();
1692 return(EXIT_SUCCESS); 1692 return(EXIT_SUCCESS);
1693 } 1693 }
1694 1694
1695 /* Read arguments and store relevant info in structs */ 1695 /* Read arguments and store relevant info in structs */
1696 while (optind < argc) { 1696 while (optind < argc) {
1697 /* deb_count = nb_elem - 1 and we need nb_elem + 1 to allocate terminal node [NULL pointer] */ 1697 /* deb_count = nb_elem - 1 and we need nb_elem + 1 to allocate terminal node [NULL pointer] */
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index da94b394f..5aa9881d5 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -41,7 +41,7 @@ extern int dpkg_deb_main(int argc, char **argv)
41 /* Setup the tar archive handle */ 41 /* Setup the tar archive handle */
42 tar_archive = init_handle(); 42 tar_archive = init_handle();
43 43
44 /* Setup an ar archive handle that refers to the gzip sub archive */ 44 /* Setup an ar archive handle that refers to the gzip sub archive */
45 ar_archive = init_handle(); 45 ar_archive = init_handle();
46 ar_archive->sub_archive = tar_archive; 46 ar_archive->sub_archive = tar_archive;
47 ar_archive->filter = filter_accept_list_reassign; 47 ar_archive->filter = filter_accept_list_reassign;
@@ -73,7 +73,7 @@ extern int dpkg_deb_main(int argc, char **argv)
73 } 73 }
74 if (opt & DPKG_DEB_OPT_FIELD) { 74 if (opt & DPKG_DEB_OPT_FIELD) {
75 /* Print the entire control file 75 /* Print the entire control file
76 * it should accept a second argument which specifies a 76 * it should accept a second argument which specifies a
77 * specific field to print */ 77 * specific field to print */
78 ar_archive->accept = control_tar_llist; 78 ar_archive->accept = control_tar_llist;
79 tar_archive->accept = llist_add_to(NULL, "./control");; 79 tar_archive->accept = llist_add_to(NULL, "./control");;
diff --git a/archival/gunzip.c b/archival/gunzip.c
index 367e0470c..dec53f660 100644
--- a/archival/gunzip.c
+++ b/archival/gunzip.c
@@ -13,7 +13,7 @@
13 * 13 *
14 * General cleanup to better adhere to the style guide and make use of standard 14 * General cleanup to better adhere to the style guide and make use of standard
15 * busybox functions by Glenn McGrath <bug1@optushome.com.au> 15 * busybox functions by Glenn McGrath <bug1@optushome.com.au>
16 * 16 *
17 * This program is free software; you can redistribute it and/or modify 17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by 18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or 19 * the Free Software Foundation; either version 2 of the License, or
@@ -153,12 +153,12 @@ extern int gunzip_main(int argc, char **argv)
153 /* do the decompression, and cleanup */ 153 /* do the decompression, and cleanup */
154 if (bb_xread_char(src_fd) == 0x1f) { 154 if (bb_xread_char(src_fd) == 0x1f) {
155 unsigned char magic2; 155 unsigned char magic2;
156 156
157 magic2 = bb_xread_char(src_fd); 157 magic2 = bb_xread_char(src_fd);
158#ifdef CONFIG_FEATURE_GUNZIP_UNCOMPRESS 158#ifdef CONFIG_FEATURE_GUNZIP_UNCOMPRESS
159 if (magic2 == 0x9d) { 159 if (magic2 == 0x9d) {
160 status = uncompress(src_fd, dst_fd); 160 status = uncompress(src_fd, dst_fd);
161 } else 161 } else
162#endif 162#endif
163 if (magic2 == 0x8b) { 163 if (magic2 == 0x8b) {
164 check_header_gzip(src_fd); 164 check_header_gzip(src_fd);
diff --git a/archival/gzip.c b/archival/gzip.c
index 2be5603a0..1708ac1a1 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -9,8 +9,8 @@
9 * only standard in to standard out with -9 compression. It also requires 9 * only standard in to standard out with -9 compression. It also requires
10 * the zcat module for some important functions." 10 * the zcat module for some important functions."
11 * 11 *
12 * Adjusted further by Erik Andersen <andersen@codepoet.org> to support 12 * Adjusted further by Erik Andersen <andersen@codepoet.org> to support
13 * files as well as stdin/stdout, and to generally behave itself wrt 13 * files as well as stdin/stdout, and to generally behave itself wrt
14 * command line handling. 14 * command line handling.
15 * 15 *
16 * This program is free software; you can redistribute it and/or modify 16 * This program is free software; you can redistribute it and/or modify
@@ -30,7 +30,7 @@
30 */ 30 */
31 31
32/* These defines are very important for BusyBox. Without these, 32/* These defines are very important for BusyBox. Without these,
33 * huge chunks of ram are pre-allocated making the BusyBox bss 33 * huge chunks of ram are pre-allocated making the BusyBox bss
34 * size Freaking Huge(tm), which is a bad thing.*/ 34 * size Freaking Huge(tm), which is a bad thing.*/
35#define SMALL_MEM 35#define SMALL_MEM
36#define DYN_ALLOC 36#define DYN_ALLOC
diff --git a/archival/libunarchive/Makefile b/archival/libunarchive/Makefile
index 272ca2434..9a20ea28b 100644
--- a/archival/libunarchive/Makefile
+++ b/archival/libunarchive/Makefile
@@ -1,6 +1,6 @@
1# Makefile for busybox 1# Makefile for busybox
2# 2#
3# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> 3# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
4# 4#
5# This program is free software; you can redistribute it and/or modify 5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by 6# it under the terms of the GNU General Public License as published by
diff --git a/archival/libunarchive/Makefile.in b/archival/libunarchive/Makefile.in
index 09b0571ed..c0e12a6c8 100644
--- a/archival/libunarchive/Makefile.in
+++ b/archival/libunarchive/Makefile.in
@@ -1,6 +1,6 @@
1# Makefile for busybox 1# Makefile for busybox
2# 2#
3# Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> 3# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
4# 4#
5# This program is free software; you can redistribute it and/or modify 5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by 6# it under the terms of the GNU General Public License as published by
@@ -55,7 +55,7 @@ DPKG_FILES:= \
55 get_header_tar.o \ 55 get_header_tar.o \
56 filter_accept_list_reassign.o 56 filter_accept_list_reassign.o
57 57
58LIBUNARCHIVE-$(CONFIG_AR) += get_header_ar.o unpack_ar_archive.o 58LIBUNARCHIVE-$(CONFIG_AR) += get_header_ar.o unpack_ar_archive.o
59LIBUNARCHIVE-$(CONFIG_BUNZIP2) += decompress_bunzip2.o 59LIBUNARCHIVE-$(CONFIG_BUNZIP2) += decompress_bunzip2.o
60LIBUNARCHIVE-$(CONFIG_CPIO) += get_header_cpio.o 60LIBUNARCHIVE-$(CONFIG_CPIO) += get_header_cpio.o
61LIBUNARCHIVE-$(CONFIG_DPKG) += $(DPKG_FILES) 61LIBUNARCHIVE-$(CONFIG_DPKG) += $(DPKG_FILES)
@@ -64,7 +64,7 @@ LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_GZ) += $(GUNZIP_FILES) get_header_tar_gz.o
64LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_BZ2) += decompress_bunzip2.o get_header_tar_bz2.o 64LIBUNARCHIVE-$(CONFIG_FEATURE_DEB_TAR_BZ2) += decompress_bunzip2.o get_header_tar_bz2.o
65LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES) 65LIBUNARCHIVE-$(CONFIG_GUNZIP) += $(GUNZIP_FILES)
66LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += uncompress.o 66LIBUNARCHIVE-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS) += uncompress.o
67LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o 67LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += $(GUNZIP_FILES) get_header_cpio.o
68LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o 68LIBUNARCHIVE-$(CONFIG_RPM) += $(GUNZIP_FILES) get_header_cpio.o
69LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o 69LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o
70LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o 70LIBUNARCHIVE-$(CONFIG_FEATURE_TAR_BZIP2) += decompress_bunzip2.o get_header_tar_bz2.o
diff --git a/archival/libunarchive/data_extract_all.c b/archival/libunarchive/data_extract_all.c
index 4cff24339..a9a3a93d8 100644
--- a/archival/libunarchive/data_extract_all.c
+++ b/archival/libunarchive/data_extract_all.c
@@ -37,7 +37,7 @@ extern void data_extract_all(archive_handle_t *archive_handle)
37 char *name = bb_xstrdup(file_header->name); 37 char *name = bb_xstrdup(file_header->name);
38 bb_make_directory (dirname(name), 0777, FILEUTILS_RECUR); 38 bb_make_directory (dirname(name), 0777, FILEUTILS_RECUR);
39 free(name); 39 free(name);
40 } 40 }
41 41
42 /* Check if the file already exists */ 42 /* Check if the file already exists */
43 if (archive_handle->flags & ARCHIVE_EXTRACT_UNCONDITIONAL) { 43 if (archive_handle->flags & ARCHIVE_EXTRACT_UNCONDITIONAL) {
@@ -66,7 +66,7 @@ extern void data_extract_all(archive_handle_t *archive_handle)
66 } 66 }
67 } 67 }
68 68
69 /* Handle hard links seperately 69 /* Handle hard links seperately
70 * We identified hard links as regular files of size 0 with a symlink */ 70 * We identified hard links as regular files of size 0 with a symlink */
71 if (S_ISREG(file_header->mode) && (file_header->link_name) && (file_header->size == 0)) { 71 if (S_ISREG(file_header->mode) && (file_header->link_name) && (file_header->size == 0)) {
72 /* hard link */ 72 /* hard link */
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c
index 3e6138c95..af165336e 100644
--- a/archival/libunarchive/decompress_bunzip2.c
+++ b/archival/libunarchive/decompress_bunzip2.c
@@ -248,7 +248,7 @@ static int get_next_block(bunzip_data *bd)
248 pp=0; 248 pp=0;
249 for(i=minLen;i<=maxLen;i++) { 249 for(i=minLen;i<=maxLen;i++) {
250 temp[i]=limit[i]=0; 250 temp[i]=limit[i]=0;
251 for(t=0;t<symCount;t++) 251 for(t=0;t<symCount;t++)
252 if(length[t]==i) hufGroup->permute[pp++] = t; 252 if(length[t]==i) hufGroup->permute[pp++] = t;
253 } 253 }
254 /* Count symbols coded for at each bit length */ 254 /* Count symbols coded for at each bit length */
diff --git a/archival/libunarchive/decompress_uncompress.c b/archival/libunarchive/decompress_uncompress.c
index 65418a7ca..ddf293fd6 100644
--- a/archival/libunarchive/decompress_uncompress.c
+++ b/archival/libunarchive/decompress_uncompress.c
@@ -3,7 +3,7 @@
3 3
4/* uncompress for busybox -- (c) 2002 Robert Griebl 4/* uncompress for busybox -- (c) 2002 Robert Griebl
5 * 5 *
6 * based on the original compress42.c source 6 * based on the original compress42.c source
7 * (see disclaimer below) 7 * (see disclaimer below)
8 */ 8 */
9 9
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index 29929c282..a436db191 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -13,7 +13,7 @@
13 * 13 *
14 * General cleanup to better adhere to the style guide and make use of standard 14 * General cleanup to better adhere to the style guide and make use of standard
15 * busybox functions by Glenn McGrath <bug1@optushome.com.au> 15 * busybox functions by Glenn McGrath <bug1@optushome.com.au>
16 * 16 *
17 * read_gz interface + associated hacking by Laurence Anderson 17 * read_gz interface + associated hacking by Laurence Anderson
18 * 18 *
19 * This program is free software; you can redistribute it and/or modify 19 * This program is free software; you can redistribute it and/or modify
@@ -148,7 +148,7 @@ static unsigned int fill_bitbuffer(unsigned int bitbuffer, unsigned int *current
148{ 148{
149 while (*current < required) { 149 while (*current < required) {
150 if (bytebuffer_offset >= bytebuffer_size) { 150 if (bytebuffer_offset >= bytebuffer_size) {
151 /* Leave the first 4 bytes empty so we can always unwind the bitbuffer 151 /* Leave the first 4 bytes empty so we can always unwind the bitbuffer
152 * to the front of the bytebuffer, leave 4 bytes free at end of tail 152 * to the front of the bytebuffer, leave 4 bytes free at end of tail
153 * so we can easily top up buffer in check_trailer_gzip() */ 153 * so we can easily top up buffer in check_trailer_gzip() */
154 bytebuffer_size = 4 + bb_xread(gunzip_src_fd, &bytebuffer[4], bytebuffer_max - 8); 154 bytebuffer_size = 4 + bb_xread(gunzip_src_fd, &bytebuffer[4], bytebuffer_max - 8);
@@ -193,7 +193,7 @@ static void make_gunzip_crc_table(void)
193/* 193/*
194 * Free the malloc'ed tables built by huft_build(), which makes a linked 194 * Free the malloc'ed tables built by huft_build(), which makes a linked
195 * list of the tables it made, with the links in a dummy first entry of 195 * list of the tables it made, with the links in a dummy first entry of
196 * each table. 196 * each table.
197 * t: table to free 197 * t: table to free
198 */ 198 */
199static int huft_free(huft_t * t) 199static int huft_free(huft_t * t)
@@ -435,9 +435,9 @@ static int inflate_codes(huft_t * my_tl, huft_t * my_td, const unsigned int my_b
435 md = mask_bits[bd]; 435 md = mask_bits[bd];
436 return 0; // Don't actually do anything the first time 436 return 0; // Don't actually do anything the first time
437 } 437 }
438 438
439 if (resumeCopy) goto do_copy; 439 if (resumeCopy) goto do_copy;
440 440
441 while (1) { /* do until end of block */ 441 while (1) { /* do until end of block */
442 b = fill_bitbuffer(b, &k, bl); 442 b = fill_bitbuffer(b, &k, bl);
443 if ((e = (t = tl + ((unsigned) b & ml))->e) > 16) 443 if ((e = (t = tl + ((unsigned) b & ml))->e) > 16)
@@ -533,7 +533,7 @@ do_copy: do {
533 /* free the decoding tables, return */ 533 /* free the decoding tables, return */
534 huft_free(tl); 534 huft_free(tl);
535 huft_free(td); 535 huft_free(td);
536 536
537 /* done */ 537 /* done */
538 return 0; 538 return 0;
539} 539}
@@ -548,7 +548,7 @@ static int inflate_stored(int my_n, int my_b_stored, int my_k_stored, int setup)
548 w = gunzip_outbuf_count; /* initialize gunzip_window position */ 548 w = gunzip_outbuf_count; /* initialize gunzip_window position */
549 return 0; // Don't do anything first time 549 return 0; // Don't do anything first time
550 } 550 }
551 551
552 /* read and output the compressed data */ 552 /* read and output the compressed data */
553 while (n--) { 553 while (n--) {
554 b_stored = fill_bitbuffer(b_stored, &k_stored, 8); 554 b_stored = fill_bitbuffer(b_stored, &k_stored, 8);
@@ -639,7 +639,7 @@ static int inflate_block(int *e)
639 inflate_stored(n, b_stored, k_stored, 1); // Setup inflate_stored 639 inflate_stored(n, b_stored, k_stored, 1); // Setup inflate_stored
640 return -1; 640 return -1;
641 } 641 }
642 case 1: /* Inflate fixed 642 case 1: /* Inflate fixed
643 * decompress an inflated type 1 (fixed Huffman codes) block. We should 643 * decompress an inflated type 1 (fixed Huffman codes) block. We should
644 * either replace this with a custom decoder, or at least precompute the 644 * either replace this with a custom decoder, or at least precompute the
645 * Huffman tables. 645 * Huffman tables.
@@ -682,9 +682,9 @@ static int inflate_block(int *e)
682 682
683 /* decompress until an end-of-block code */ 683 /* decompress until an end-of-block code */
684 inflate_codes(tl, td, bl, bd, 1); // Setup inflate_codes 684 inflate_codes(tl, td, bl, bd, 1); // Setup inflate_codes
685 685
686 /* huft_free code moved into inflate_codes */ 686 /* huft_free code moved into inflate_codes */
687 687
688 return -2; 688 return -2;
689 } 689 }
690 case 2: /* Inflate dynamic */ 690 case 2: /* Inflate dynamic */
@@ -836,7 +836,7 @@ static int inflate_block(int *e)
836 inflate_codes(tl, td, bl, bd, 1); // Setup inflate_codes 836 inflate_codes(tl, td, bl, bd, 1); // Setup inflate_codes
837 837
838 /* huft_free code moved into inflate_codes */ 838 /* huft_free code moved into inflate_codes */
839 839
840 return -2; 840 return -2;
841 } 841 }
842 default: 842 default:
@@ -859,12 +859,12 @@ static int inflate_get_next_window(void)
859 static int method = -1; // Method == -1 for stored, -2 for codes 859 static int method = -1; // Method == -1 for stored, -2 for codes
860 static int e = 0; 860 static int e = 0;
861 static int needAnotherBlock = 1; 861 static int needAnotherBlock = 1;
862 862
863 gunzip_outbuf_count = 0; 863 gunzip_outbuf_count = 0;
864 864
865 while(1) { 865 while(1) {
866 int ret; 866 int ret;
867 867
868 if (needAnotherBlock) { 868 if (needAnotherBlock) {
869 if(e) { 869 if(e) {
870 calculate_gunzip_crc(); 870 calculate_gunzip_crc();
@@ -875,7 +875,7 @@ static int inflate_get_next_window(void)
875 method = inflate_block(&e); 875 method = inflate_block(&e);
876 needAnotherBlock = 0; 876 needAnotherBlock = 0;
877 } 877 }
878 878
879 switch (method) { 879 switch (method) {
880 case -1: ret = inflate_stored(0,0,0,0); 880 case -1: ret = inflate_stored(0,0,0,0);
881 break; 881 break;
@@ -920,7 +920,7 @@ extern int inflate_unzip(int in, int out)
920 make_gunzip_crc_table(); 920 make_gunzip_crc_table();
921 921
922 /* Allocate space for buffer */ 922 /* Allocate space for buffer */
923 bytebuffer = xmalloc(bytebuffer_max); 923 bytebuffer = xmalloc(bytebuffer_max);
924 924
925 while(1) { 925 while(1) {
926 int ret = inflate_get_next_window(); 926 int ret = inflate_get_next_window();
@@ -977,6 +977,6 @@ extern int inflate_gunzip(int in, int out)
977 (bytebuffer[bytebuffer_offset+2] << 16) | (bytebuffer[bytebuffer_offset+3] << 24))) { 977 (bytebuffer[bytebuffer_offset+2] << 16) | (bytebuffer[bytebuffer_offset+3] << 24))) {
978 bb_error_msg("Incorrect length"); 978 bb_error_msg("Incorrect length");
979 } 979 }
980 980
981 return 0; 981 return 0;
982} 982}
diff --git a/archival/libunarchive/filter_accept_list_reassign.c b/archival/libunarchive/filter_accept_list_reassign.c
index 1e9da0f2b..d0436549b 100644
--- a/archival/libunarchive/filter_accept_list_reassign.c
+++ b/archival/libunarchive/filter_accept_list_reassign.c
@@ -26,7 +26,7 @@
26/* 26/*
27 * Reassign the subarchive metadata parser based on the filename extension 27 * Reassign the subarchive metadata parser based on the filename extension
28 * e.g. if its a .tar.gz modify archive_handle->sub_archive to process a .tar.gz 28 * e.g. if its a .tar.gz modify archive_handle->sub_archive to process a .tar.gz
29 * or if its a .tar.bz2 make archive_handle->sub_archive handle that 29 * or if its a .tar.bz2 make archive_handle->sub_archive handle that
30 */ 30 */
31extern char filter_accept_list_reassign(archive_handle_t *archive_handle) 31extern char filter_accept_list_reassign(archive_handle_t *archive_handle)
32{ 32{
diff --git a/archival/libunarchive/get_header_ar.c b/archival/libunarchive/get_header_ar.c
index 25eafe0bd..86e0bc08f 100644
--- a/archival/libunarchive/get_header_ar.c
+++ b/archival/libunarchive/get_header_ar.c
@@ -113,7 +113,7 @@ extern char get_header_ar(archive_handle_t *archive_handle)
113 archive_handle->action_data(archive_handle); 113 archive_handle->action_data(archive_handle);
114 } 114 }
115 } else { 115 } else {
116 data_skip(archive_handle); 116 data_skip(archive_handle);
117 } 117 }
118 118
119 archive_handle->offset += typed->size; 119 archive_handle->offset += typed->size;
diff --git a/archival/libunarchive/get_header_cpio.c b/archival/libunarchive/get_header_cpio.c
index 25fdc0600..e8a68f1c3 100644
--- a/archival/libunarchive/get_header_cpio.c
+++ b/archival/libunarchive/get_header_cpio.c
@@ -36,7 +36,7 @@ extern char get_header_cpio(archive_handle_t *archive_handle)
36 int namesize; 36 int namesize;
37 char dummy[16]; 37 char dummy[16];
38 int major, minor, nlink, inode; 38 int major, minor, nlink, inode;
39 39
40 if (pending_hardlinks) { /* Deal with any pending hardlinks */ 40 if (pending_hardlinks) { /* Deal with any pending hardlinks */
41 hardlinks_t *tmp; 41 hardlinks_t *tmp;
42 hardlinks_t *oldtmp; 42 hardlinks_t *oldtmp;
@@ -77,7 +77,7 @@ extern char get_header_cpio(archive_handle_t *archive_handle)
77 { 77 {
78 unsigned long tmpsize; 78 unsigned long tmpsize;
79 sscanf(cpio_header, "%6c%8x%8x%8x%8x%8x%8lx%8lx%16c%8x%8x%8x%8c", 79 sscanf(cpio_header, "%6c%8x%8x%8x%8x%8x%8lx%8lx%16c%8x%8x%8x%8c",
80 dummy, &inode, (unsigned int*)&file_header->mode, 80 dummy, &inode, (unsigned int*)&file_header->mode,
81 (unsigned int*)&file_header->uid, (unsigned int*)&file_header->gid, 81 (unsigned int*)&file_header->uid, (unsigned int*)&file_header->gid,
82 &nlink, &file_header->mtime, &tmpsize, 82 &nlink, &file_header->mtime, &tmpsize,
83 dummy, &major, &minor, &namesize, dummy); 83 dummy, &major, &minor, &namesize, dummy);
@@ -147,7 +147,7 @@ extern char get_header_cpio(archive_handle_t *archive_handle)
147 archive_handle->action_data(archive_handle); 147 archive_handle->action_data(archive_handle);
148 archive_handle->action_header(archive_handle->file_header); 148 archive_handle->action_header(archive_handle->file_header);
149 } else { 149 } else {
150 data_skip(archive_handle); 150 data_skip(archive_handle);
151 } 151 }
152 152
153 archive_handle->offset += file_header->size; 153 archive_handle->offset += file_header->size;
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index ad580617b..c6ebdae80 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -119,7 +119,7 @@ extern char get_header_tar(archive_handle_t *archive_handle)
119 file_header->gid = strtol(tar.formated.gid, NULL, 8); 119 file_header->gid = strtol(tar.formated.gid, NULL, 8);
120 file_header->size = strtol(tar.formated.size, NULL, 8); 120 file_header->size = strtol(tar.formated.size, NULL, 8);
121 file_header->mtime = strtol(tar.formated.mtime, NULL, 8); 121 file_header->mtime = strtol(tar.formated.mtime, NULL, 8);
122 file_header->link_name = (tar.formated.linkname[0] != '\0') ? 122 file_header->link_name = (tar.formated.linkname[0] != '\0') ?
123 bb_xstrdup(tar.formated.linkname) : NULL; 123 bb_xstrdup(tar.formated.linkname) : NULL;
124 file_header->device = (dev_t) ((strtol(tar.formated.devmajor, NULL, 8) << 8) + 124 file_header->device = (dev_t) ((strtol(tar.formated.devmajor, NULL, 8) << 8) +
125 strtol(tar.formated.devminor, NULL, 8)); 125 strtol(tar.formated.devminor, NULL, 8));
@@ -205,7 +205,7 @@ extern char get_header_tar(archive_handle_t *archive_handle)
205 archive_handle->action_data(archive_handle); 205 archive_handle->action_data(archive_handle);
206 archive_handle->passed = llist_add_to(archive_handle->passed, file_header->name); 206 archive_handle->passed = llist_add_to(archive_handle->passed, file_header->name);
207 } else { 207 } else {
208 data_skip(archive_handle); 208 data_skip(archive_handle);
209 } 209 }
210 archive_handle->offset += file_header->size; 210 archive_handle->offset += file_header->size;
211 211
diff --git a/archival/libunarchive/uncompress.c b/archival/libunarchive/uncompress.c
index 65418a7ca..ddf293fd6 100644
--- a/archival/libunarchive/uncompress.c
+++ b/archival/libunarchive/uncompress.c
@@ -3,7 +3,7 @@
3 3
4/* uncompress for busybox -- (c) 2002 Robert Griebl 4/* uncompress for busybox -- (c) 2002 Robert Griebl
5 * 5 *
6 * based on the original compress42.c source 6 * based on the original compress42.c source
7 * (see disclaimer below) 7 * (see disclaimer below)
8 */ 8 */
9 9
diff --git a/archival/libunarchive/unzip.c b/archival/libunarchive/unzip.c
index 29929c282..a436db191 100644
--- a/archival/libunarchive/unzip.c
+++ b/archival/libunarchive/unzip.c
@@ -13,7 +13,7 @@
13 * 13 *
14 * General cleanup to better adhere to the style guide and make use of standard 14 * General cleanup to better adhere to the style guide and make use of standard
15 * busybox functions by Glenn McGrath <bug1@optushome.com.au> 15 * busybox functions by Glenn McGrath <bug1@optushome.com.au>
16 * 16 *
17 * read_gz interface + associated hacking by Laurence Anderson 17 * read_gz interface + associated hacking by Laurence Anderson
18 * 18 *
19 * This program is free software; you can redistribute it and/or modify 19 * This program is free software; you can redistribute it and/or modify
@@ -148,7 +148,7 @@ static unsigned int fill_bitbuffer(unsigned int bitbuffer, unsigned int *current
148{ 148{
149 while (*current < required) { 149 while (*current < required) {
150 if (bytebuffer_offset >= bytebuffer_size) { 150 if (bytebuffer_offset >= bytebuffer_size) {
151 /* Leave the first 4 bytes empty so we can always unwind the bitbuffer 151 /* Leave the first 4 bytes empty so we can always unwind the bitbuffer
152 * to the front of the bytebuffer, leave 4 bytes free at end of tail 152 * to the front of the bytebuffer, leave 4 bytes free at end of tail
153 * so we can easily top up buffer in check_trailer_gzip() */ 153 * so we can easily top up buffer in check_trailer_gzip() */
154 bytebuffer_size = 4 + bb_xread(gunzip_src_fd, &bytebuffer[4], bytebuffer_max - 8); 154 bytebuffer_size = 4 + bb_xread(gunzip_src_fd, &bytebuffer[4], bytebuffer_max - 8);
@@ -193,7 +193,7 @@ static void make_gunzip_crc_table(void)
193/* 193/*
194 * Free the malloc'ed tables built by huft_build(), which makes a linked 194 * Free the malloc'ed tables built by huft_build(), which makes a linked
195 * list of the tables it made, with the links in a dummy first entry of 195 * list of the tables it made, with the links in a dummy first entry of
196 * each table. 196 * each table.
197 * t: table to free 197 * t: table to free
198 */ 198 */
199static int huft_free(huft_t * t) 199static int huft_free(huft_t * t)
@@ -435,9 +435,9 @@ static int inflate_codes(huft_t * my_tl, huft_t * my_td, const unsigned int my_b
435 md = mask_bits[bd]; 435 md = mask_bits[bd];
436 return 0; // Don't actually do anything the first time 436 return 0; // Don't actually do anything the first time
437 } 437 }
438 438
439 if (resumeCopy) goto do_copy; 439 if (resumeCopy) goto do_copy;
440 440
441 while (1) { /* do until end of block */ 441 while (1) { /* do until end of block */
442 b = fill_bitbuffer(b, &k, bl); 442 b = fill_bitbuffer(b, &k, bl);
443 if ((e = (t = tl + ((unsigned) b & ml))->e) > 16) 443 if ((e = (t = tl + ((unsigned) b & ml))->e) > 16)
@@ -533,7 +533,7 @@ do_copy: do {
533 /* free the decoding tables, return */ 533 /* free the decoding tables, return */
534 huft_free(tl); 534 huft_free(tl);
535 huft_free(td); 535 huft_free(td);
536 536
537 /* done */ 537 /* done */
538 return 0; 538 return 0;
539} 539}
@@ -548,7 +548,7 @@ static int inflate_stored(int my_n, int my_b_stored, int my_k_stored, int setup)
548 w = gunzip_outbuf_count; /* initialize gunzip_window position */ 548 w = gunzip_outbuf_count; /* initialize gunzip_window position */
549 return 0; // Don't do anything first time 549 return 0; // Don't do anything first time
550 } 550 }
551 551
552 /* read and output the compressed data */ 552 /* read and output the compressed data */
553 while (n--) { 553 while (n--) {
554 b_stored = fill_bitbuffer(b_stored, &k_stored, 8); 554 b_stored = fill_bitbuffer(b_stored, &k_stored, 8);
@@ -639,7 +639,7 @@ static int inflate_block(int *e)
639 inflate_stored(n, b_stored, k_stored, 1); // Setup inflate_stored 639 inflate_stored(n, b_stored, k_stored, 1); // Setup inflate_stored
640 return -1; 640 return -1;
641 } 641 }
642 case 1: /* Inflate fixed 642 case 1: /* Inflate fixed
643 * decompress an inflated type 1 (fixed Huffman codes) block. We should 643 * decompress an inflated type 1 (fixed Huffman codes) block. We should
644 * either replace this with a custom decoder, or at least precompute the 644 * either replace this with a custom decoder, or at least precompute the
645 * Huffman tables. 645 * Huffman tables.
@@ -682,9 +682,9 @@ static int inflate_block(int *e)
682 682
683 /* decompress until an end-of-block code */ 683 /* decompress until an end-of-block code */
684 inflate_codes(tl, td, bl, bd, 1); // Setup inflate_codes 684 inflate_codes(tl, td, bl, bd, 1); // Setup inflate_codes
685 685
686 /* huft_free code moved into inflate_codes */ 686 /* huft_free code moved into inflate_codes */
687 687
688 return -2; 688 return -2;
689 } 689 }
690 case 2: /* Inflate dynamic */ 690 case 2: /* Inflate dynamic */
@@ -836,7 +836,7 @@ static int inflate_block(int *e)
836 inflate_codes(tl, td, bl, bd, 1); // Setup inflate_codes 836 inflate_codes(tl, td, bl, bd, 1); // Setup inflate_codes
837 837
838 /* huft_free code moved into inflate_codes */ 838 /* huft_free code moved into inflate_codes */
839 839
840 return -2; 840 return -2;
841 } 841 }
842 default: 842 default:
@@ -859,12 +859,12 @@ static int inflate_get_next_window(void)
859 static int method = -1; // Method == -1 for stored, -2 for codes 859 static int method = -1; // Method == -1 for stored, -2 for codes
860 static int e = 0; 860 static int e = 0;
861 static int needAnotherBlock = 1; 861 static int needAnotherBlock = 1;
862 862
863 gunzip_outbuf_count = 0; 863 gunzip_outbuf_count = 0;
864 864
865 while(1) { 865 while(1) {
866 int ret; 866 int ret;
867 867
868 if (needAnotherBlock) { 868 if (needAnotherBlock) {
869 if(e) { 869 if(e) {
870 calculate_gunzip_crc(); 870 calculate_gunzip_crc();
@@ -875,7 +875,7 @@ static int inflate_get_next_window(void)
875 method = inflate_block(&e); 875 method = inflate_block(&e);
876 needAnotherBlock = 0; 876 needAnotherBlock = 0;
877 } 877 }
878 878
879 switch (method) { 879 switch (method) {
880 case -1: ret = inflate_stored(0,0,0,0); 880 case -1: ret = inflate_stored(0,0,0,0);
881 break; 881 break;
@@ -920,7 +920,7 @@ extern int inflate_unzip(int in, int out)
920 make_gunzip_crc_table(); 920 make_gunzip_crc_table();
921 921
922 /* Allocate space for buffer */ 922 /* Allocate space for buffer */
923 bytebuffer = xmalloc(bytebuffer_max); 923 bytebuffer = xmalloc(bytebuffer_max);
924 924
925 while(1) { 925 while(1) {
926 int ret = inflate_get_next_window(); 926 int ret = inflate_get_next_window();
@@ -977,6 +977,6 @@ extern int inflate_gunzip(int in, int out)
977 (bytebuffer[bytebuffer_offset+2] << 16) | (bytebuffer[bytebuffer_offset+3] << 24))) { 977 (bytebuffer[bytebuffer_offset+2] << 16) | (bytebuffer[bytebuffer_offset+3] << 24))) {
978 bb_error_msg("Incorrect length"); 978 bb_error_msg("Incorrect length");
979 } 979 }
980 980
981 return 0; 981 return 0;
982} 982}
diff --git a/archival/rpm.c b/archival/rpm.c
index eb2c0433b..30cdc93fb 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -204,12 +204,12 @@ void extract_cpio_gz(int fd) {
204 archive_handle->flags |= ARCHIVE_CREATE_LEADING_DIRS; 204 archive_handle->flags |= ARCHIVE_CREATE_LEADING_DIRS;
205 archive_handle->src_fd = fd; 205 archive_handle->src_fd = fd;
206 archive_handle->offset = 0; 206 archive_handle->offset = 0;
207 207
208 bb_xread_all(archive_handle->src_fd, &magic, 2); 208 bb_xread_all(archive_handle->src_fd, &magic, 2);
209 if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) { 209 if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) {
210 bb_error_msg_and_die("Invalid gzip magic"); 210 bb_error_msg_and_die("Invalid gzip magic");
211 } 211 }
212 check_header_gzip(archive_handle->src_fd); 212 check_header_gzip(archive_handle->src_fd);
213 chdir("/"); // Install RPM's to root 213 chdir("/"); // Install RPM's to root
214 214
215 archive_handle->src_fd = open_transformer(archive_handle->src_fd, inflate_gunzip); 215 archive_handle->src_fd = open_transformer(archive_handle->src_fd, inflate_gunzip);
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c
index d0041a83c..7b5059518 100644
--- a/archival/rpm2cpio.c
+++ b/archival/rpm2cpio.c
@@ -89,7 +89,7 @@ extern int rpm2cpio_main(int argc, char **argv)
89 89
90 /* Skip the main header */ 90 /* Skip the main header */
91 skip_header(rpm_fd); 91 skip_header(rpm_fd);
92 92
93 bb_xread_all(rpm_fd, &magic, 2); 93 bb_xread_all(rpm_fd, &magic, 2);
94 if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) { 94 if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) {
95 bb_error_msg_and_die("Invalid gzip magic"); 95 bb_error_msg_and_die("Invalid gzip magic");
diff --git a/archival/tar.c b/archival/tar.c
index cbd069425..2310e80cb 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -1,6 +1,6 @@
1/* vi: set sw=4 ts=4: */ 1/* vi: set sw=4 ts=4: */
2/* 2/*
3 * Mini tar implementation for busybox 3 * Mini tar implementation for busybox
4 * 4 *
5 * Modifed to use common extraction code used by ar, cpio, dpkg-deb, dpkg 5 * Modifed to use common extraction code used by ar, cpio, dpkg-deb, dpkg
6 * Glenn McGrath <bug1@optushome.com.au> 6 * Glenn McGrath <bug1@optushome.com.au>
@@ -9,7 +9,7 @@
9 * ground up. It still has remnents of the old code lying about, but it is 9 * ground up. It still has remnents of the old code lying about, but it is
10 * very different now (i.e., cleaner, less global variables, etc.) 10 * very different now (i.e., cleaner, less global variables, etc.)
11 * 11 *
12 * Copyright (C) 1999-2003 by Erik Andersen <andersen@codepoet.org> 12 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
13 * 13 *
14 * Based in part in the tar implementation in sash 14 * Based in part in the tar implementation in sash
15 * Copyright (c) 1999 by David I. Bell 15 * Copyright (c) 1999 by David I. Bell
@@ -111,7 +111,7 @@ struct TarBallInfo {
111 for the tarball */ 111 for the tarball */
112 struct stat statBuf; /* Stat info for the tarball, letting 112 struct stat statBuf; /* Stat info for the tarball, letting
113 us know the inode and device that the 113 us know the inode and device that the
114 tarball lives, so we can avoid trying 114 tarball lives, so we can avoid trying
115 to include the tarball into itself */ 115 to include the tarball into itself */
116 int verboseFlag; /* Whether to print extra stuff or not */ 116 int verboseFlag; /* Whether to print extra stuff or not */
117 const llist_t *excludeList; /* List of files to not include */ 117 const llist_t *excludeList; /* List of files to not include */
@@ -470,7 +470,7 @@ static inline int writeTarFile(const int tar_fd, const int verboseFlag,
470 (void) &include; 470 (void) &include;
471 (void) &errorFlag; 471 (void) &errorFlag;
472# endif 472# endif
473 473
474 gzipPid = vfork(); 474 gzipPid = vfork();
475 475
476 if (gzipPid == 0) { 476 if (gzipPid == 0) {
@@ -616,7 +616,7 @@ static char get_header_tar_Z(archive_handle_t *archive_handle)
616#endif 616#endif
617 617
618#ifdef CONFIG_FEATURE_TAR_BZIP2 618#ifdef CONFIG_FEATURE_TAR_BZIP2
619# define TAR_OPT_BZIP2 (1 << (8 + TAR_OPT_FLAG_CREATE)) 619# define TAR_OPT_BZIP2 (1 << (8 + TAR_OPT_FLAG_CREATE))
620# define TAR_OPT_STR_BZIP2 "j" 620# define TAR_OPT_STR_BZIP2 "j"
621# define TAR_OPT_FLAG_BZIP2 1 621# define TAR_OPT_FLAG_BZIP2 1
622#else 622#else
@@ -646,7 +646,7 @@ static char get_header_tar_Z(archive_handle_t *archive_handle)
646#ifdef CONFIG_FEATURE_TAR_COMPRESS 646#ifdef CONFIG_FEATURE_TAR_COMPRESS
647# define TAR_OPT_UNCOMPRESS (1 << (8 + TAR_OPT_FLAG_CREATE + TAR_OPT_FLAG_BZIP2 + TAR_OPT_FLAG_FROM + TAR_OPT_FLAG_GZIP)) 647# define TAR_OPT_UNCOMPRESS (1 << (8 + TAR_OPT_FLAG_CREATE + TAR_OPT_FLAG_BZIP2 + TAR_OPT_FLAG_FROM + TAR_OPT_FLAG_GZIP))
648# define TAR_OPT_STR_COMPRESS "Z" 648# define TAR_OPT_STR_COMPRESS "Z"
649#else 649#else
650# define TAR_OPT_STR_COMPRESS "" 650# define TAR_OPT_STR_COMPRESS ""
651#endif 651#endif
652 652
@@ -740,7 +740,7 @@ int tar_main(int argc, char **argv)
740 bb_show_usage(); 740 bb_show_usage();
741 } 741 }
742 if(ctx_flag & CTX_TEST) { 742 if(ctx_flag & CTX_TEST) {
743 if ((tar_handle->action_header == header_list) || 743 if ((tar_handle->action_header == header_list) ||
744 (tar_handle->action_header == header_verbose_list)) { 744 (tar_handle->action_header == header_verbose_list)) {
745 tar_handle->action_header = header_verbose_list; 745 tar_handle->action_header = header_verbose_list;
746 } else { 746 } else {
@@ -756,8 +756,8 @@ int tar_main(int argc, char **argv)
756 tar_handle->action_data = data_extract_to_stdout; 756 tar_handle->action_data = data_extract_to_stdout;
757 } 757 }
758 if(opt & TAR_OPT_VERBOSE) { 758 if(opt & TAR_OPT_VERBOSE) {
759 if ((tar_handle->action_header == header_list) || 759 if ((tar_handle->action_header == header_list) ||
760 (tar_handle->action_header == header_verbose_list)) 760 (tar_handle->action_header == header_verbose_list))
761 { 761 {
762 tar_handle->action_header = header_verbose_list; 762 tar_handle->action_header = header_verbose_list;
763 } else { 763 } else {
@@ -860,13 +860,13 @@ int tar_main(int argc, char **argv)
860 } 860 }
861# endif /* CONFIG_FEATURE_TAR_BZIP2 */ 861# endif /* CONFIG_FEATURE_TAR_BZIP2 */
862 862
863 if ((tar_handle->action_header == header_list) || 863 if ((tar_handle->action_header == header_list) ||
864 (tar_handle->action_header == header_verbose_list)) { 864 (tar_handle->action_header == header_verbose_list)) {
865 verboseFlag = TRUE; 865 verboseFlag = TRUE;
866 } 866 }
867 writeTarFile(tar_handle->src_fd, verboseFlag, opt & TAR_OPT_DEREFERNCE, tar_handle->accept, 867 writeTarFile(tar_handle->src_fd, verboseFlag, opt & TAR_OPT_DEREFERNCE, tar_handle->accept,
868 tar_handle->reject, gzipFlag); 868 tar_handle->reject, gzipFlag);
869 } else 869 } else
870#endif /* CONFIG_FEATURE_TAR_CREATE */ 870#endif /* CONFIG_FEATURE_TAR_CREATE */
871 { 871 {
872 while (get_header_ptr(tar_handle) == EXIT_SUCCESS); 872 while (get_header_ptr(tar_handle) == EXIT_SUCCESS);