diff options
author | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:42:39 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:45:21 +0100 |
commit | 517cf74f6265ec4308b790b637b3f9778cbdc6e0 (patch) | |
tree | be9337069b60ca1bb03565d8575bacfc71181003 /archival/libarchive | |
parent | ae65dc37bcc9b1d9cef0b111131c79dc4ba1bf51 (diff) | |
parent | ac78f2ac96b3efd6551a08e7dc609efa1fb69481 (diff) | |
download | busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.gz busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.bz2 busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'archival/libarchive')
-rw-r--r-- | archival/libarchive/data_extract_all.c | 4 | ||||
-rw-r--r-- | archival/libarchive/decompress_bunzip2.c | 2 | ||||
-rw-r--r-- | archival/libarchive/decompress_gunzip.c | 14 | ||||
-rw-r--r-- | archival/libarchive/decompress_uncompress.c | 10 | ||||
-rw-r--r-- | archival/libarchive/decompress_unlzma.c | 6 | ||||
-rw-r--r-- | archival/libarchive/decompress_unxz.c | 4 | ||||
-rw-r--r-- | archival/libarchive/get_header_ar.c | 8 | ||||
-rw-r--r-- | archival/libarchive/get_header_cpio.c | 6 | ||||
-rw-r--r-- | archival/libarchive/get_header_tar.c | 14 | ||||
-rw-r--r-- | archival/libarchive/open_transformer.c | 6 | ||||
-rw-r--r-- | archival/libarchive/seek_by_jump.c | 2 | ||||
-rw-r--r-- | archival/libarchive/unpack_ar_archive.c | 2 |
12 files changed, 39 insertions, 39 deletions
diff --git a/archival/libarchive/data_extract_all.c b/archival/libarchive/data_extract_all.c index 4c95db4a6..3142405a3 100644 --- a/archival/libarchive/data_extract_all.c +++ b/archival/libarchive/data_extract_all.c | |||
@@ -103,7 +103,7 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle) | |||
103 | struct stat existing_sb; | 103 | struct stat existing_sb; |
104 | if (lstat(dst_name, &existing_sb) == -1) { | 104 | if (lstat(dst_name, &existing_sb) == -1) { |
105 | if (errno != ENOENT) { | 105 | if (errno != ENOENT) { |
106 | bb_perror_msg_and_die("can't stat old file"); | 106 | bb_simple_perror_msg_and_die("can't stat old file"); |
107 | } | 107 | } |
108 | } | 108 | } |
109 | else if (existing_sb.st_mtime >= file_header->mtime) { | 109 | else if (existing_sb.st_mtime >= file_header->mtime) { |
@@ -207,7 +207,7 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle) | |||
207 | } | 207 | } |
208 | break; | 208 | break; |
209 | default: | 209 | default: |
210 | bb_error_msg_and_die("unrecognized file type"); | 210 | bb_simple_error_msg_and_die("unrecognized file type"); |
211 | } | 211 | } |
212 | 212 | ||
213 | if (!S_ISLNK(file_header->mode)) { | 213 | if (!S_ISLNK(file_header->mode)) { |
diff --git a/archival/libarchive/decompress_bunzip2.c b/archival/libarchive/decompress_bunzip2.c index 1f535b32a..42e2b4f88 100644 --- a/archival/libarchive/decompress_bunzip2.c +++ b/archival/libarchive/decompress_bunzip2.c | |||
@@ -817,7 +817,7 @@ unpack_bz2_stream(transformer_state_t *xstate) | |||
817 | break; | 817 | break; |
818 | } | 818 | } |
819 | if (bd->headerCRC != bd->totalCRC) { | 819 | if (bd->headerCRC != bd->totalCRC) { |
820 | bb_error_msg("CRC error"); | 820 | bb_simple_error_msg("CRC error"); |
821 | break; | 821 | break; |
822 | } | 822 | } |
823 | 823 | ||
diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c index 32fcb6b51..cf07f71df 100644 --- a/archival/libarchive/decompress_gunzip.c +++ b/archival/libarchive/decompress_gunzip.c | |||
@@ -1012,7 +1012,7 @@ inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate) | |||
1012 | error_msg = "corrupted data"; | 1012 | error_msg = "corrupted data"; |
1013 | if (setjmp(error_jmp)) { | 1013 | if (setjmp(error_jmp)) { |
1014 | /* Error from deep inside zip machinery */ | 1014 | /* Error from deep inside zip machinery */ |
1015 | bb_error_msg(error_msg); | 1015 | bb_simple_error_msg(error_msg); |
1016 | n = -1; | 1016 | n = -1; |
1017 | goto ret; | 1017 | goto ret; |
1018 | } | 1018 | } |
@@ -1085,7 +1085,7 @@ static int top_up(STATE_PARAM unsigned n) | |||
1085 | bytebuffer_offset = 0; | 1085 | bytebuffer_offset = 0; |
1086 | bytebuffer_size = full_read(gunzip_src_fd, &bytebuffer[count], bytebuffer_max - count); | 1086 | bytebuffer_size = full_read(gunzip_src_fd, &bytebuffer[count], bytebuffer_max - count); |
1087 | if ((int)bytebuffer_size < 0) { | 1087 | if ((int)bytebuffer_size < 0) { |
1088 | bb_error_msg(bb_msg_read_error); | 1088 | bb_simple_error_msg(bb_msg_read_error); |
1089 | return 0; | 1089 | return 0; |
1090 | } | 1090 | } |
1091 | bytebuffer_size += count; | 1091 | bytebuffer_size += count; |
@@ -1217,7 +1217,7 @@ unpack_gz_stream(transformer_state_t *xstate) | |||
1217 | 1217 | ||
1218 | if (full_read(xstate->src_fd, &magic2, 2) != 2) { | 1218 | if (full_read(xstate->src_fd, &magic2, 2) != 2) { |
1219 | bad_magic: | 1219 | bad_magic: |
1220 | bb_error_msg("invalid magic"); | 1220 | bb_simple_error_msg("invalid magic"); |
1221 | return -1; | 1221 | return -1; |
1222 | } | 1222 | } |
1223 | if (magic2 == COMPRESS_MAGIC) { | 1223 | if (magic2 == COMPRESS_MAGIC) { |
@@ -1239,7 +1239,7 @@ unpack_gz_stream(transformer_state_t *xstate) | |||
1239 | 1239 | ||
1240 | again: | 1240 | again: |
1241 | if (!check_header_gzip(PASS_STATE xstate)) { | 1241 | if (!check_header_gzip(PASS_STATE xstate)) { |
1242 | bb_error_msg("corrupted data"); | 1242 | bb_simple_error_msg("corrupted data"); |
1243 | total = -1; | 1243 | total = -1; |
1244 | goto ret; | 1244 | goto ret; |
1245 | } | 1245 | } |
@@ -1252,7 +1252,7 @@ unpack_gz_stream(transformer_state_t *xstate) | |||
1252 | total += n; | 1252 | total += n; |
1253 | 1253 | ||
1254 | if (!top_up(PASS_STATE 8)) { | 1254 | if (!top_up(PASS_STATE 8)) { |
1255 | bb_error_msg("corrupted data"); | 1255 | bb_simple_error_msg("corrupted data"); |
1256 | total = -1; | 1256 | total = -1; |
1257 | goto ret; | 1257 | goto ret; |
1258 | } | 1258 | } |
@@ -1260,7 +1260,7 @@ unpack_gz_stream(transformer_state_t *xstate) | |||
1260 | /* Validate decompression - crc */ | 1260 | /* Validate decompression - crc */ |
1261 | v32 = buffer_read_le_u32(PASS_STATE_ONLY); | 1261 | v32 = buffer_read_le_u32(PASS_STATE_ONLY); |
1262 | if ((~gunzip_crc) != v32) { | 1262 | if ((~gunzip_crc) != v32) { |
1263 | bb_error_msg("crc error"); | 1263 | bb_simple_error_msg("crc error"); |
1264 | total = -1; | 1264 | total = -1; |
1265 | goto ret; | 1265 | goto ret; |
1266 | } | 1266 | } |
@@ -1268,7 +1268,7 @@ unpack_gz_stream(transformer_state_t *xstate) | |||
1268 | /* Validate decompression - size */ | 1268 | /* Validate decompression - size */ |
1269 | v32 = buffer_read_le_u32(PASS_STATE_ONLY); | 1269 | v32 = buffer_read_le_u32(PASS_STATE_ONLY); |
1270 | if ((uint32_t)gunzip_bytes_out != v32) { | 1270 | if ((uint32_t)gunzip_bytes_out != v32) { |
1271 | bb_error_msg("incorrect length"); | 1271 | bb_simple_error_msg("incorrect length"); |
1272 | total = -1; | 1272 | total = -1; |
1273 | } | 1273 | } |
1274 | 1274 | ||
diff --git a/archival/libarchive/decompress_uncompress.c b/archival/libarchive/decompress_uncompress.c index 1517559c6..2725a7f09 100644 --- a/archival/libarchive/decompress_uncompress.c +++ b/archival/libarchive/decompress_uncompress.c | |||
@@ -113,7 +113,7 @@ unpack_Z_stream(transformer_state_t *xstate) | |||
113 | /* xread isn't good here, we have to return - caller may want | 113 | /* xread isn't good here, we have to return - caller may want |
114 | * to do some cleanup (e.g. delete incomplete unpacked file etc) */ | 114 | * to do some cleanup (e.g. delete incomplete unpacked file etc) */ |
115 | if (full_read(xstate->src_fd, inbuf, 1) != 1) { | 115 | if (full_read(xstate->src_fd, inbuf, 1) != 1) { |
116 | bb_error_msg("short read"); | 116 | bb_simple_error_msg("short read"); |
117 | goto err; | 117 | goto err; |
118 | } | 118 | } |
119 | 119 | ||
@@ -166,7 +166,7 @@ unpack_Z_stream(transformer_state_t *xstate) | |||
166 | if (insize < (int) (IBUFSIZ + 64) - IBUFSIZ) { | 166 | if (insize < (int) (IBUFSIZ + 64) - IBUFSIZ) { |
167 | rsize = safe_read(xstate->src_fd, inbuf + insize, IBUFSIZ); | 167 | rsize = safe_read(xstate->src_fd, inbuf + insize, IBUFSIZ); |
168 | if (rsize < 0) | 168 | if (rsize < 0) |
169 | bb_error_msg_and_die(bb_msg_read_error); | 169 | bb_simple_error_msg_and_die(bb_msg_read_error); |
170 | insize += rsize; | 170 | insize += rsize; |
171 | } | 171 | } |
172 | 172 | ||
@@ -200,7 +200,7 @@ unpack_Z_stream(transformer_state_t *xstate) | |||
200 | 200 | ||
201 | if (oldcode == -1) { | 201 | if (oldcode == -1) { |
202 | if (code >= 256) | 202 | if (code >= 256) |
203 | bb_error_msg_and_die("corrupted data"); /* %ld", code); */ | 203 | bb_simple_error_msg_and_die("corrupted data"); /* %ld", code); */ |
204 | oldcode = code; | 204 | oldcode = code; |
205 | finchar = (int) oldcode; | 205 | finchar = (int) oldcode; |
206 | outbuf[outpos++] = (unsigned char) finchar; | 206 | outbuf[outpos++] = (unsigned char) finchar; |
@@ -236,7 +236,7 @@ unpack_Z_stream(transformer_state_t *xstate) | |||
236 | insize, posbits, p[-1], p[0], p[1], p[2], p[3], | 236 | insize, posbits, p[-1], p[0], p[1], p[2], p[3], |
237 | (posbits & 07)); | 237 | (posbits & 07)); |
238 | */ | 238 | */ |
239 | bb_error_msg("corrupted data"); | 239 | bb_simple_error_msg("corrupted data"); |
240 | goto err; | 240 | goto err; |
241 | } | 241 | } |
242 | 242 | ||
@@ -247,7 +247,7 @@ unpack_Z_stream(transformer_state_t *xstate) | |||
247 | /* Generate output characters in reverse order */ | 247 | /* Generate output characters in reverse order */ |
248 | while (code >= 256) { | 248 | while (code >= 256) { |
249 | if (stackp <= &htabof(0)) | 249 | if (stackp <= &htabof(0)) |
250 | bb_error_msg_and_die("corrupted data"); | 250 | bb_simple_error_msg_and_die("corrupted data"); |
251 | *--stackp = tab_suffixof(code); | 251 | *--stackp = tab_suffixof(code); |
252 | code = tab_prefixof(code); | 252 | code = tab_prefixof(code); |
253 | } | 253 | } |
diff --git a/archival/libarchive/decompress_unlzma.c b/archival/libarchive/decompress_unlzma.c index 668b01618..0744f231a 100644 --- a/archival/libarchive/decompress_unlzma.c +++ b/archival/libarchive/decompress_unlzma.c | |||
@@ -59,7 +59,7 @@ static void rc_read(rc_t *rc) | |||
59 | //TODO: return -1 instead | 59 | //TODO: return -1 instead |
60 | //This will make unlzma delete broken unpacked file on unpack errors | 60 | //This will make unlzma delete broken unpacked file on unpack errors |
61 | if (buffer_size <= 0) | 61 | if (buffer_size <= 0) |
62 | bb_error_msg_and_die("unexpected EOF"); | 62 | bb_simple_error_msg_and_die("unexpected EOF"); |
63 | rc->buffer_end = RC_BUFFER + buffer_size; | 63 | rc->buffer_end = RC_BUFFER + buffer_size; |
64 | rc->ptr = RC_BUFFER; | 64 | rc->ptr = RC_BUFFER; |
65 | } | 65 | } |
@@ -234,7 +234,7 @@ unpack_lzma_stream(transformer_state_t *xstate) | |||
234 | if (full_read(xstate->src_fd, &header, sizeof(header)) != sizeof(header) | 234 | if (full_read(xstate->src_fd, &header, sizeof(header)) != sizeof(header) |
235 | || header.pos >= (9 * 5 * 5) | 235 | || header.pos >= (9 * 5 * 5) |
236 | ) { | 236 | ) { |
237 | bb_error_msg("bad lzma header"); | 237 | bb_simple_error_msg("bad lzma header"); |
238 | return -1; | 238 | return -1; |
239 | } | 239 | } |
240 | 240 | ||
@@ -513,7 +513,7 @@ unpack_lzma_stream(transformer_state_t *xstate) | |||
513 | * potentially more detailed information). | 513 | * potentially more detailed information). |
514 | * Do not fail silently. | 514 | * Do not fail silently. |
515 | */ | 515 | */ |
516 | bb_error_msg("corrupted data"); | 516 | bb_simple_error_msg("corrupted data"); |
517 | total_written = -1; /* failure */ | 517 | total_written = -1; /* failure */ |
518 | } | 518 | } |
519 | rc_free(rc); | 519 | rc_free(rc); |
diff --git a/archival/libarchive/decompress_unxz.c b/archival/libarchive/decompress_unxz.c index 8ae7a275b..f03341384 100644 --- a/archival/libarchive/decompress_unxz.c +++ b/archival/libarchive/decompress_unxz.c | |||
@@ -74,7 +74,7 @@ unpack_xz_stream(transformer_state_t *xstate) | |||
74 | if (iobuf.in_pos == iobuf.in_size) { | 74 | if (iobuf.in_pos == iobuf.in_size) { |
75 | int rd = safe_read(xstate->src_fd, membuf, BUFSIZ); | 75 | int rd = safe_read(xstate->src_fd, membuf, BUFSIZ); |
76 | if (rd < 0) { | 76 | if (rd < 0) { |
77 | bb_error_msg(bb_msg_read_error); | 77 | bb_simple_error_msg(bb_msg_read_error); |
78 | total = -1; | 78 | total = -1; |
79 | break; | 79 | break; |
80 | } | 80 | } |
@@ -123,7 +123,7 @@ unpack_xz_stream(transformer_state_t *xstate) | |||
123 | continue; | 123 | continue; |
124 | } | 124 | } |
125 | if (xz_result != XZ_OK && xz_result != XZ_UNSUPPORTED_CHECK) { | 125 | if (xz_result != XZ_OK && xz_result != XZ_UNSUPPORTED_CHECK) { |
126 | bb_error_msg("corrupted data"); | 126 | bb_simple_error_msg("corrupted data"); |
127 | total = -1; | 127 | total = -1; |
128 | break; | 128 | break; |
129 | } | 129 | } |
diff --git a/archival/libarchive/get_header_ar.c b/archival/libarchive/get_header_ar.c index 7ce9c615c..b6ecd596c 100644 --- a/archival/libarchive/get_header_ar.c +++ b/archival/libarchive/get_header_ar.c | |||
@@ -22,7 +22,7 @@ static unsigned read_num(char *str, int base, int len) | |||
22 | * on misformatted numbers bb_strtou returns all-ones */ | 22 | * on misformatted numbers bb_strtou returns all-ones */ |
23 | err = bb_strtou(str, NULL, base); | 23 | err = bb_strtou(str, NULL, base); |
24 | if (err == -1) | 24 | if (err == -1) |
25 | bb_error_msg_and_die("invalid ar header"); | 25 | bb_simple_error_msg_and_die("invalid ar header"); |
26 | return err; | 26 | return err; |
27 | } | 27 | } |
28 | 28 | ||
@@ -53,7 +53,7 @@ char FAST_FUNC get_header_ar(archive_handle_t *archive_handle) | |||
53 | archive_handle->offset += 60; | 53 | archive_handle->offset += 60; |
54 | 54 | ||
55 | if (ar.formatted.magic[0] != '`' || ar.formatted.magic[1] != '\n') | 55 | if (ar.formatted.magic[0] != '`' || ar.formatted.magic[1] != '\n') |
56 | bb_error_msg_and_die("invalid ar header"); | 56 | bb_simple_error_msg_and_die("invalid ar header"); |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * Note that the fields MUST be read in reverse order as | 59 | * Note that the fields MUST be read in reverse order as |
@@ -86,7 +86,7 @@ char FAST_FUNC get_header_ar(archive_handle_t *archive_handle) | |||
86 | return get_header_ar(archive_handle); | 86 | return get_header_ar(archive_handle); |
87 | } | 87 | } |
88 | #else | 88 | #else |
89 | bb_error_msg_and_die("long filenames not supported"); | 89 | bb_simple_error_msg_and_die("long filenames not supported"); |
90 | #endif | 90 | #endif |
91 | } | 91 | } |
92 | /* Only size is always present, the rest may be missing in | 92 | /* Only size is always present, the rest may be missing in |
@@ -107,7 +107,7 @@ char FAST_FUNC get_header_ar(archive_handle_t *archive_handle) | |||
107 | long_offset = read_num(&ar.formatted.name[1], 10, | 107 | long_offset = read_num(&ar.formatted.name[1], 10, |
108 | sizeof(ar.formatted.name) - 1); | 108 | sizeof(ar.formatted.name) - 1); |
109 | if (long_offset >= archive_handle->ar__long_name_size) { | 109 | if (long_offset >= archive_handle->ar__long_name_size) { |
110 | bb_error_msg_and_die("can't resolve long filename"); | 110 | bb_simple_error_msg_and_die("can't resolve long filename"); |
111 | } | 111 | } |
112 | typed->name = xstrdup(archive_handle->ar__long_names + long_offset); | 112 | typed->name = xstrdup(archive_handle->ar__long_names + long_offset); |
113 | } else | 113 | } else |
diff --git a/archival/libarchive/get_header_cpio.c b/archival/libarchive/get_header_cpio.c index 75fc6a406..4ad174732 100644 --- a/archival/libarchive/get_header_cpio.c +++ b/archival/libarchive/get_header_cpio.c | |||
@@ -33,14 +33,14 @@ char FAST_FUNC get_header_cpio(archive_handle_t *archive_handle) | |||
33 | goto create_hardlinks; | 33 | goto create_hardlinks; |
34 | } | 34 | } |
35 | if (size != 110) { | 35 | if (size != 110) { |
36 | bb_error_msg_and_die("short read"); | 36 | bb_simple_error_msg_and_die("short read"); |
37 | } | 37 | } |
38 | archive_handle->offset += 110; | 38 | archive_handle->offset += 110; |
39 | 39 | ||
40 | if (!is_prefixed_with(&cpio_header[0], "07070") | 40 | if (!is_prefixed_with(&cpio_header[0], "07070") |
41 | || (cpio_header[5] != '1' && cpio_header[5] != '2') | 41 | || (cpio_header[5] != '1' && cpio_header[5] != '2') |
42 | ) { | 42 | ) { |
43 | bb_error_msg_and_die("unsupported cpio format, use newc or crc"); | 43 | bb_simple_error_msg_and_die("unsupported cpio format, use newc or crc"); |
44 | } | 44 | } |
45 | 45 | ||
46 | if (sscanf(cpio_header + 6, | 46 | if (sscanf(cpio_header + 6, |
@@ -50,7 +50,7 @@ char FAST_FUNC get_header_cpio(archive_handle_t *archive_handle) | |||
50 | &inode, &mode, &uid, &gid, | 50 | &inode, &mode, &uid, &gid, |
51 | &nlink, &mtime, &size, | 51 | &nlink, &mtime, &size, |
52 | &major, &minor, &namesize) != 10) | 52 | &major, &minor, &namesize) != 10) |
53 | bb_error_msg_and_die("damaged cpio file"); | 53 | bb_simple_error_msg_and_die("damaged cpio file"); |
54 | file_header->mode = mode; | 54 | file_header->mode = mode; |
55 | /* "cpio -R USER:GRP" support: */ | 55 | /* "cpio -R USER:GRP" support: */ |
56 | if (archive_handle->cpio__owner.uid != (uid_t)-1L) | 56 | if (archive_handle->cpio__owner.uid != (uid_t)-1L) |
diff --git a/archival/libarchive/get_header_tar.c b/archival/libarchive/get_header_tar.c index 52fa4554a..b3131ff2d 100644 --- a/archival/libarchive/get_header_tar.c +++ b/archival/libarchive/get_header_tar.c | |||
@@ -32,7 +32,7 @@ static unsigned long long getOctal(char *str, int len) | |||
32 | if (*end != '\0' && *end != ' ') { | 32 | if (*end != '\0' && *end != ' ') { |
33 | int8_t first = str[0]; | 33 | int8_t first = str[0]; |
34 | if (!(first & 0x80)) | 34 | if (!(first & 0x80)) |
35 | bb_error_msg_and_die("corrupted octal value in tar header"); | 35 | bb_simple_error_msg_and_die("corrupted octal value in tar header"); |
36 | /* | 36 | /* |
37 | * GNU tar uses "base-256 encoding" for very large numbers. | 37 | * GNU tar uses "base-256 encoding" for very large numbers. |
38 | * Encoding is binary, with highest bit always set as a marker | 38 | * Encoding is binary, with highest bit always set as a marker |
@@ -100,7 +100,7 @@ static void process_pax_hdr(archive_handle_t *archive_handle, unsigned sz, int g | |||
100 | || errno != EINVAL | 100 | || errno != EINVAL |
101 | || *end != ' ' | 101 | || *end != ' ' |
102 | ) { | 102 | ) { |
103 | bb_error_msg("malformed extended header, skipped"); | 103 | bb_simple_error_msg("malformed extended header, skipped"); |
104 | // More verbose version: | 104 | // More verbose version: |
105 | //bb_error_msg("malformed extended header at %"OFF_FMT"d, skipped", | 105 | //bb_error_msg("malformed extended header at %"OFF_FMT"d, skipped", |
106 | // archive_handle->offset - (sz + len)); | 106 | // archive_handle->offset - (sz + len)); |
@@ -194,13 +194,13 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle) | |||
194 | * the very first read fails. Grrr. | 194 | * the very first read fails. Grrr. |
195 | */ | 195 | */ |
196 | if (archive_handle->offset == 0) | 196 | if (archive_handle->offset == 0) |
197 | bb_error_msg("short read"); | 197 | bb_simple_error_msg("short read"); |
198 | /* this merely signals end of archive, not exit(1): */ | 198 | /* this merely signals end of archive, not exit(1): */ |
199 | return EXIT_FAILURE; | 199 | return EXIT_FAILURE; |
200 | } | 200 | } |
201 | if (i != 512) { | 201 | if (i != 512) { |
202 | IF_FEATURE_TAR_AUTODETECT(goto autodetect;) | 202 | IF_FEATURE_TAR_AUTODETECT(goto autodetect;) |
203 | bb_error_msg_and_die("short read"); | 203 | bb_simple_error_msg_and_die("short read"); |
204 | } | 204 | } |
205 | 205 | ||
206 | #else | 206 | #else |
@@ -243,11 +243,11 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle) | |||
243 | goto err; | 243 | goto err; |
244 | if (setup_unzip_on_fd(archive_handle->src_fd, /*fail_if_not_compressed:*/ 0) != 0) | 244 | if (setup_unzip_on_fd(archive_handle->src_fd, /*fail_if_not_compressed:*/ 0) != 0) |
245 | err: | 245 | err: |
246 | bb_error_msg_and_die("invalid tar magic"); | 246 | bb_simple_error_msg_and_die("invalid tar magic"); |
247 | archive_handle->offset = 0; | 247 | archive_handle->offset = 0; |
248 | goto again_after_align; | 248 | goto again_after_align; |
249 | #endif | 249 | #endif |
250 | bb_error_msg_and_die("invalid tar magic"); | 250 | bb_simple_error_msg_and_die("invalid tar magic"); |
251 | } | 251 | } |
252 | 252 | ||
253 | /* Do checksum on headers. | 253 | /* Do checksum on headers. |
@@ -282,7 +282,7 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle) | |||
282 | if (sum_u != sum | 282 | if (sum_u != sum |
283 | IF_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum) | 283 | IF_FEATURE_TAR_OLDSUN_COMPATIBILITY(&& sum_s != sum) |
284 | ) { | 284 | ) { |
285 | bb_error_msg_and_die("invalid tar header checksum"); | 285 | bb_simple_error_msg_and_die("invalid tar header checksum"); |
286 | } | 286 | } |
287 | 287 | ||
288 | /* GET_OCTAL trashes subsequent field, therefore we call it | 288 | /* GET_OCTAL trashes subsequent field, therefore we call it |
diff --git a/archival/libarchive/open_transformer.c b/archival/libarchive/open_transformer.c index 3a0fc4712..1ac72af79 100644 --- a/archival/libarchive/open_transformer.c +++ b/archival/libarchive/open_transformer.c | |||
@@ -15,7 +15,7 @@ int FAST_FUNC check_signature16(transformer_state_t *xstate, unsigned magic16) | |||
15 | if (!xstate->signature_skipped) { | 15 | if (!xstate->signature_skipped) { |
16 | uint16_t magic2; | 16 | uint16_t magic2; |
17 | if (full_read(xstate->src_fd, &magic2, 2) != 2 || magic2 != magic16) { | 17 | if (full_read(xstate->src_fd, &magic2, 2) != 2 || magic2 != magic16) { |
18 | bb_error_msg("invalid magic"); | 18 | bb_simple_error_msg("invalid magic"); |
19 | return -1; | 19 | return -1; |
20 | } | 20 | } |
21 | xstate->signature_skipped = 2; | 21 | xstate->signature_skipped = 2; |
@@ -46,7 +46,7 @@ ssize_t FAST_FUNC transformer_write(transformer_state_t *xstate, const void *buf | |||
46 | } else { | 46 | } else { |
47 | nwrote = full_write(xstate->dst_fd, buf, bufsize); | 47 | nwrote = full_write(xstate->dst_fd, buf, bufsize); |
48 | if (nwrote != (ssize_t)bufsize) { | 48 | if (nwrote != (ssize_t)bufsize) { |
49 | bb_perror_msg("write"); | 49 | bb_simple_perror_msg("write"); |
50 | nwrote = -1; | 50 | nwrote = -1; |
51 | goto ret; | 51 | goto ret; |
52 | } | 52 | } |
@@ -226,7 +226,7 @@ static transformer_state_t *setup_transformer_on_fd(int fd, int fail_if_not_comp | |||
226 | 226 | ||
227 | /* No known magic seen */ | 227 | /* No known magic seen */ |
228 | if (fail_if_not_compressed) | 228 | if (fail_if_not_compressed) |
229 | bb_error_msg_and_die("no gzip" | 229 | bb_simple_error_msg_and_die("no gzip" |
230 | IF_FEATURE_SEAMLESS_BZ2("/bzip2") | 230 | IF_FEATURE_SEAMLESS_BZ2("/bzip2") |
231 | IF_FEATURE_SEAMLESS_XZ("/xz") | 231 | IF_FEATURE_SEAMLESS_XZ("/xz") |
232 | " magic"); | 232 | " magic"); |
diff --git a/archival/libarchive/seek_by_jump.c b/archival/libarchive/seek_by_jump.c index 232d97e53..dddaa3732 100644 --- a/archival/libarchive/seek_by_jump.c +++ b/archival/libarchive/seek_by_jump.c | |||
@@ -13,6 +13,6 @@ void FAST_FUNC seek_by_jump(int fd, off_t amount) | |||
13 | if (errno == ESPIPE) | 13 | if (errno == ESPIPE) |
14 | seek_by_read(fd, amount); | 14 | seek_by_read(fd, amount); |
15 | else | 15 | else |
16 | bb_perror_msg_and_die("seek failure"); | 16 | bb_simple_perror_msg_and_die("seek failure"); |
17 | } | 17 | } |
18 | } | 18 | } |
diff --git a/archival/libarchive/unpack_ar_archive.c b/archival/libarchive/unpack_ar_archive.c index 4f9f89874..584c18ce8 100644 --- a/archival/libarchive/unpack_ar_archive.c +++ b/archival/libarchive/unpack_ar_archive.c | |||
@@ -12,7 +12,7 @@ void FAST_FUNC unpack_ar_archive(archive_handle_t *ar_archive) | |||
12 | 12 | ||
13 | xread(ar_archive->src_fd, magic, AR_MAGIC_LEN); | 13 | xread(ar_archive->src_fd, magic, AR_MAGIC_LEN); |
14 | if (!is_prefixed_with(magic, AR_MAGIC)) { | 14 | if (!is_prefixed_with(magic, AR_MAGIC)) { |
15 | bb_error_msg_and_die("invalid ar magic"); | 15 | bb_simple_error_msg_and_die("invalid ar magic"); |
16 | } | 16 | } |
17 | ar_archive->offset += AR_MAGIC_LEN; | 17 | ar_archive->offset += AR_MAGIC_LEN; |
18 | 18 | ||