aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
Diffstat (limited to 'archival')
-rw-r--r--archival/ar.c2
-rw-r--r--archival/dpkg.c12
-rw-r--r--archival/libunarchive/archive_xread_all_eof.c2
-rw-r--r--archival/libunarchive/check_header_gzip.c2
-rw-r--r--archival/libunarchive/decompress_unzip.c2
-rw-r--r--archival/libunarchive/get_header_cpio.c2
-rw-r--r--archival/libunarchive/get_header_tar_bz2.c2
-rw-r--r--archival/libunarchive/get_header_tar_gz.c2
-rw-r--r--archival/libunarchive/seek_by_jump.c2
-rw-r--r--archival/libunarchive/seek_by_read.c2
-rw-r--r--archival/libunarchive/unpack_ar_archive.c2
-rw-r--r--archival/rpm.c2
-rw-r--r--archival/rpm2cpio.c4
-rw-r--r--archival/tar.c6
-rw-r--r--archival/uncompress.c4
15 files changed, 24 insertions, 24 deletions
diff --git a/archival/ar.c b/archival/ar.c
index 06a879b93..521e03799 100644
--- a/archival/ar.c
+++ b/archival/ar.c
@@ -83,7 +83,7 @@ int ar_main(int argc, char **argv)
83 83
84 xread(archive_handle->src_fd, magic, 7); 84 xread(archive_handle->src_fd, magic, 7);
85 if (strncmp(magic, "!<arch>", 7) != 0) { 85 if (strncmp(magic, "!<arch>", 7) != 0) {
86 bb_error_msg_and_die("Invalid ar magic"); 86 bb_error_msg_and_die("invalid ar magic");
87 } 87 }
88 archive_handle->offset += 7; 88 archive_handle->offset += 7;
89 89
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 4d0f3fbf3..2f7372100 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -711,7 +711,7 @@ static unsigned int get_status(const unsigned int status_node, const int num)
711 /* skip past the separating spaces */ 711 /* skip past the separating spaces */
712 status_string += strspn(status_string, " "); 712 status_string += strspn(status_string, " ");
713 } 713 }
714 len = strcspn(status_string, " \n\0"); 714 len = strcspn(status_string, " \n");
715 state_sub_string = xstrndup(status_string, len); 715 state_sub_string = xstrndup(status_string, len);
716 state_sub_num = search_name_hashtable(state_sub_string); 716 state_sub_num = search_name_hashtable(state_sub_string);
717 free(state_sub_string); 717 free(state_sub_string);
@@ -796,7 +796,7 @@ static void index_status_file(const char *filename)
796 if (status_line != NULL) { 796 if (status_line != NULL) {
797 status_line += 7; 797 status_line += 7;
798 status_line += strspn(status_line, " \n\t"); 798 status_line += strspn(status_line, " \n\t");
799 status_line = xstrndup(status_line, strcspn(status_line, "\n\0")); 799 status_line = xstrndup(status_line, strcspn(status_line, "\n"));
800 status_node->status = search_name_hashtable(status_line); 800 status_node->status = search_name_hashtable(status_line);
801 free(status_line); 801 free(status_line);
802 } 802 }
@@ -849,7 +849,7 @@ static void write_status_file(deb_file_t **deb_file)
849 849
850 tmp_string += 8; 850 tmp_string += 8;
851 tmp_string += strspn(tmp_string, " \n\t"); 851 tmp_string += strspn(tmp_string, " \n\t");
852 package_name = xstrndup(tmp_string, strcspn(tmp_string, "\n\0")); 852 package_name = xstrndup(tmp_string, strcspn(tmp_string, "\n"));
853 write_flag = FALSE; 853 write_flag = FALSE;
854 tmp_string = strstr(control_buffer, "Status:"); 854 tmp_string = strstr(control_buffer, "Status:");
855 if (tmp_string != NULL) { 855 if (tmp_string != NULL) {
@@ -1374,8 +1374,8 @@ static void remove_package(const unsigned int package_num, int noisy)
1374 sprintf(conffile_name, "/var/lib/dpkg/info/%s.conffiles", package_name); 1374 sprintf(conffile_name, "/var/lib/dpkg/info/%s.conffiles", package_name);
1375 exclude_files = create_list(conffile_name); 1375 exclude_files = create_list(conffile_name);
1376 1376
1377 /* Some directories cant be removed straight away, so do multiple passes */ 1377 /* Some directories can't be removed straight away, so do multiple passes */
1378 while (remove_file_array(remove_files, exclude_files)); 1378 while (remove_file_array(remove_files, exclude_files)) /*repeat */;
1379 free_array(exclude_files); 1379 free_array(exclude_files);
1380 free_array(remove_files); 1380 free_array(remove_files);
1381 1381
@@ -1421,7 +1421,7 @@ static void purge_package(const unsigned int package_num)
1421 exclude_files = xzalloc(sizeof(char*)); 1421 exclude_files = xzalloc(sizeof(char*));
1422 1422
1423 /* Some directories cant be removed straight away, so do multiple passes */ 1423 /* Some directories cant be removed straight away, so do multiple passes */
1424 while (remove_file_array(remove_files, exclude_files)); 1424 while (remove_file_array(remove_files, exclude_files)) /* repeat */;
1425 free_array(remove_files); 1425 free_array(remove_files);
1426 1426
1427 /* Create a list of all /var/lib/dpkg/info/<package> files */ 1427 /* Create a list of all /var/lib/dpkg/info/<package> files */
diff --git a/archival/libunarchive/archive_xread_all_eof.c b/archival/libunarchive/archive_xread_all_eof.c
index e03fb0caa..8513ffecb 100644
--- a/archival/libunarchive/archive_xread_all_eof.c
+++ b/archival/libunarchive/archive_xread_all_eof.c
@@ -15,7 +15,7 @@ ssize_t archive_xread_all_eof(archive_handle_t *archive_handle, unsigned char *b
15 15
16 size = full_read(archive_handle->src_fd, buf, count); 16 size = full_read(archive_handle->src_fd, buf, count);
17 if ((size != 0) && (size != count)) { 17 if ((size != 0) && (size != count)) {
18 bb_perror_msg_and_die("Short read, read %ld of %ld", (long)size, (long)count); 18 bb_perror_msg_and_die("short read, read %ld of %ld", (long)size, (long)count);
19 } 19 }
20 return(size); 20 return(size);
21} 21}
diff --git a/archival/libunarchive/check_header_gzip.c b/archival/libunarchive/check_header_gzip.c
index 00d1919a7..3e42035b9 100644
--- a/archival/libunarchive/check_header_gzip.c
+++ b/archival/libunarchive/check_header_gzip.c
@@ -24,7 +24,7 @@ void check_header_gzip(int src_fd)
24 24
25 /* Check the compression method */ 25 /* Check the compression method */
26 if (header.formatted.method != 8) { 26 if (header.formatted.method != 8) {
27 bb_error_msg_and_die("Unknown compression method %d", 27 bb_error_msg_and_die("unknown compression method %d",
28 header.formatted.method); 28 header.formatted.method);
29 } 29 }
30 30
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index 27b4ddbcf..9e3e98dd5 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -745,7 +745,7 @@ static int inflate_block(int *e)
745 745
746 if ((i = huft_build(ll, nl, 257, cplens, cplext, &tl, &bl)) != 0) { 746 if ((i = huft_build(ll, nl, 257, cplens, cplext, &tl, &bl)) != 0) {
747 if (i == 1) { 747 if (i == 1) {
748 bb_error_msg_and_die("Incomplete literal tree"); 748 bb_error_msg_and_die("incomplete literal tree");
749 huft_free(tl); 749 huft_free(tl);
750 } 750 }
751 return i; /* incomplete code set */ 751 return i; /* incomplete code set */
diff --git a/archival/libunarchive/get_header_cpio.c b/archival/libunarchive/get_header_cpio.c
index 56862f137..dd48cb09b 100644
--- a/archival/libunarchive/get_header_cpio.c
+++ b/archival/libunarchive/get_header_cpio.c
@@ -57,7 +57,7 @@ char get_header_cpio(archive_handle_t *archive_handle)
57 archive_handle->offset += 110; 57 archive_handle->offset += 110;
58 58
59 if ((strncmp(&cpio_header[0], "07070", 5) != 0) || ((cpio_header[5] != '1') && (cpio_header[5] != '2'))) { 59 if ((strncmp(&cpio_header[0], "07070", 5) != 0) || ((cpio_header[5] != '1') && (cpio_header[5] != '2'))) {
60 bb_error_msg_and_die("Unsupported cpio format, use newc or crc"); 60 bb_error_msg_and_die("unsupported cpio format, use newc or crc");
61 } 61 }
62 62
63 { 63 {
diff --git a/archival/libunarchive/get_header_tar_bz2.c b/archival/libunarchive/get_header_tar_bz2.c
index e3cb328fc..e7a80fc41 100644
--- a/archival/libunarchive/get_header_tar_bz2.c
+++ b/archival/libunarchive/get_header_tar_bz2.c
@@ -15,7 +15,7 @@
15 15
16char get_header_tar_bz2(archive_handle_t *archive_handle) 16char get_header_tar_bz2(archive_handle_t *archive_handle)
17{ 17{
18 /* Cant lseek over pipe's */ 18 /* Can't lseek over pipes */
19 archive_handle->seek = seek_by_read; 19 archive_handle->seek = seek_by_read;
20 20
21 archive_handle->src_fd = open_transformer(archive_handle->src_fd, uncompressStream); 21 archive_handle->src_fd = open_transformer(archive_handle->src_fd, uncompressStream);
diff --git a/archival/libunarchive/get_header_tar_gz.c b/archival/libunarchive/get_header_tar_gz.c
index af059a187..41c02e16a 100644
--- a/archival/libunarchive/get_header_tar_gz.c
+++ b/archival/libunarchive/get_header_tar_gz.c
@@ -12,7 +12,7 @@ char get_header_tar_gz(archive_handle_t *archive_handle)
12{ 12{
13 unsigned char magic[2]; 13 unsigned char magic[2];
14 14
15 /* Cant lseek over pipe's */ 15 /* Can't lseek over pipes */
16 archive_handle->seek = seek_by_read; 16 archive_handle->seek = seek_by_read;
17 17
18 xread(archive_handle->src_fd, &magic, 2); 18 xread(archive_handle->src_fd, &magic, 2);
diff --git a/archival/libunarchive/seek_by_jump.c b/archival/libunarchive/seek_by_jump.c
index e1917dd2a..d605f61dd 100644
--- a/archival/libunarchive/seek_by_jump.c
+++ b/archival/libunarchive/seek_by_jump.c
@@ -19,6 +19,6 @@ void seek_by_jump(const archive_handle_t *archive_handle, const unsigned int amo
19 seek_by_read(archive_handle, amount); 19 seek_by_read(archive_handle, amount);
20 } else 20 } else
21#endif 21#endif
22 bb_perror_msg_and_die("Seek failure"); 22 bb_perror_msg_and_die("seek failure");
23 } 23 }
24} 24}
diff --git a/archival/libunarchive/seek_by_read.c b/archival/libunarchive/seek_by_read.c
index 03cbb9ecc..d56f94b21 100644
--- a/archival/libunarchive/seek_by_read.c
+++ b/archival/libunarchive/seek_by_read.c
@@ -8,7 +8,7 @@
8#include "unarchive.h" 8#include "unarchive.h"
9#include "libbb.h" 9#include "libbb.h"
10 10
11/* If we are reading through a pipe(), or from stdin then we cant lseek, 11/* If we are reading through a pipe(), or from stdin then we can't lseek,
12 * we must read and discard the data to skip over it. 12 * we must read and discard the data to skip over it.
13 */ 13 */
14void seek_by_read(const archive_handle_t *archive_handle, const unsigned int jump_size) 14void seek_by_read(const archive_handle_t *archive_handle, const unsigned int jump_size)
diff --git a/archival/libunarchive/unpack_ar_archive.c b/archival/libunarchive/unpack_ar_archive.c
index eed528391..6a84ae811 100644
--- a/archival/libunarchive/unpack_ar_archive.c
+++ b/archival/libunarchive/unpack_ar_archive.c
@@ -14,7 +14,7 @@ void unpack_ar_archive(archive_handle_t *ar_archive)
14 14
15 xread(ar_archive->src_fd, magic, 7); 15 xread(ar_archive->src_fd, magic, 7);
16 if (strncmp(magic, "!<arch>", 7) != 0) { 16 if (strncmp(magic, "!<arch>", 7) != 0) {
17 bb_error_msg_and_die("Invalid ar magic"); 17 bb_error_msg_and_die("invalid ar magic");
18 } 18 }
19 ar_archive->offset += 7; 19 ar_archive->offset += 7;
20 20
diff --git a/archival/rpm.c b/archival/rpm.c
index 448a479a0..2ef7232f4 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -183,7 +183,7 @@ static void extract_cpio_gz(int fd) {
183 183
184 xread(archive_handle->src_fd, &magic, 2); 184 xread(archive_handle->src_fd, &magic, 2);
185 if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) { 185 if ((magic[0] != 0x1f) || (magic[1] != 0x8b)) {
186 bb_error_msg_and_die("Invalid gzip magic"); 186 bb_error_msg_and_die("invalid gzip magic");
187 } 187 }
188 check_header_gzip(archive_handle->src_fd); 188 check_header_gzip(archive_handle->src_fd);
189 xchdir("/"); // Install RPM's to root 189 xchdir("/"); // Install RPM's to root
diff --git a/archival/rpm2cpio.c b/archival/rpm2cpio.c
index c00c6be65..3442046c4 100644
--- a/archival/rpm2cpio.c
+++ b/archival/rpm2cpio.c
@@ -37,10 +37,10 @@ static void skip_header(int rpm_fd)
37 37
38 xread(rpm_fd, &header, sizeof(struct rpm_header)); 38 xread(rpm_fd, &header, sizeof(struct rpm_header));
39 if (strncmp((char *) &header.magic, RPM_HEADER_MAGIC, 3) != 0) { 39 if (strncmp((char *) &header.magic, RPM_HEADER_MAGIC, 3) != 0) {
40 bb_error_msg_and_die("Invalid RPM header magic"); /* Invalid magic */ 40 bb_error_msg_and_die("invalid RPM header magic"); /* Invalid magic */
41 } 41 }
42 if (header.version != 1) { 42 if (header.version != 1) {
43 bb_error_msg_and_die("Unsupported RPM header version"); /* This program only supports v1 headers */ 43 bb_error_msg_and_die("unsupported RPM header version"); /* This program only supports v1 headers */
44 } 44 }
45 header.entries = ntohl(header.entries); 45 header.entries = ntohl(header.entries);
46 header.size = ntohl(header.size); 46 header.size = ntohl(header.size);
diff --git a/archival/tar.c b/archival/tar.c
index 2c4280cc4..d96d20227 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -496,7 +496,7 @@ static int writeTarFile(const int tar_fd, const int verboseFlag,
496 freeHardLinkInfo(&tbInfo.hlInfoHead); 496 freeHardLinkInfo(&tbInfo.hlInfoHead);
497 497
498 if (errorFlag) 498 if (errorFlag)
499 bb_error_msg("Error exit delayed from previous errors"); 499 bb_error_msg("error exit delayed from previous errors");
500 500
501 if (gzipPid && waitpid(gzipPid, NULL, 0)==-1) 501 if (gzipPid && waitpid(gzipPid, NULL, 0)==-1)
502 bb_error_msg("cannot wait"); 502 bb_error_msg("cannot wait");
@@ -540,7 +540,7 @@ static llist_t *append_file_list_to_list(llist_t *list)
540#ifdef CONFIG_FEATURE_TAR_COMPRESS 540#ifdef CONFIG_FEATURE_TAR_COMPRESS
541static char get_header_tar_Z(archive_handle_t *archive_handle) 541static char get_header_tar_Z(archive_handle_t *archive_handle)
542{ 542{
543 /* Cant lseek over pipe's */ 543 /* Can't lseek over pipes */
544 archive_handle->seek = seek_by_read; 544 archive_handle->seek = seek_by_read;
545 545
546 /* do the decompression, and cleanup */ 546 /* do the decompression, and cleanup */
@@ -556,7 +556,7 @@ static char get_header_tar_Z(archive_handle_t *archive_handle)
556 /* nothing */; 556 /* nothing */;
557 557
558 /* Can only do one file at a time */ 558 /* Can only do one file at a time */
559 return(EXIT_FAILURE); 559 return EXIT_FAILURE;
560} 560}
561#else 561#else
562#define get_header_tar_Z 0 562#define get_header_tar_Z 0
diff --git a/archival/uncompress.c b/archival/uncompress.c
index d1b0d2cb3..3c78961d5 100644
--- a/archival/uncompress.c
+++ b/archival/uncompress.c
@@ -49,7 +49,7 @@ int uncompress_main(int argc, char **argv)
49 49
50 extension = strrchr(uncompressed_file, '.'); 50 extension = strrchr(uncompressed_file, '.');
51 if (!extension || (strcmp(extension, ".Z") != 0)) { 51 if (!extension || (strcmp(extension, ".Z") != 0)) {
52 bb_error_msg_and_die("Invalid extension"); 52 bb_error_msg_and_die("invalid extension");
53 } 53 }
54 *extension = '\0'; 54 *extension = '\0';
55 55
@@ -65,7 +65,7 @@ int uncompress_main(int argc, char **argv)
65 65
66 /* do the decompression, and cleanup */ 66 /* do the decompression, and cleanup */
67 if ((xread_char(src_fd) != 0x1f) || (xread_char(src_fd) != 0x9d)) { 67 if ((xread_char(src_fd) != 0x1f) || (xread_char(src_fd) != 0x9d)) {
68 bb_error_msg_and_die("Invalid magic"); 68 bb_error_msg_and_die("invalid magic");
69 } 69 }
70 70
71 status = uncompress(src_fd, dst_fd); 71 status = uncompress(src_fd, dst_fd);