diff options
Diffstat (limited to 'archival')
-rw-r--r-- | archival/bbunzip.c | 2 | ||||
-rw-r--r-- | archival/bzip2.c | 4 | ||||
-rw-r--r-- | archival/dpkg.c | 14 | ||||
-rw-r--r-- | archival/gzip.c | 4 | ||||
-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 | ||||
-rw-r--r-- | archival/lzop.c | 14 | ||||
-rw-r--r-- | archival/rpm.c | 2 | ||||
-rw-r--r-- | archival/tar.c | 10 | ||||
-rw-r--r-- | archival/unzip.c | 18 |
20 files changed, 73 insertions, 73 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c index 93f30d324..d31aaf7f3 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c | |||
@@ -114,7 +114,7 @@ int FAST_FUNC bbunpack(char **argv, | |||
114 | 114 | ||
115 | /* Check that the input is sane */ | 115 | /* Check that the input is sane */ |
116 | if (!(option_mask32 & BBUNPK_OPT_FORCE) && isatty(STDIN_FILENO)) { | 116 | if (!(option_mask32 & BBUNPK_OPT_FORCE) && isatty(STDIN_FILENO)) { |
117 | bb_error_msg_and_die("compressed data not read from terminal, " | 117 | bb_simple_error_msg_and_die("compressed data not read from terminal, " |
118 | "use -f to force it"); | 118 | "use -f to force it"); |
119 | } | 119 | } |
120 | 120 | ||
diff --git a/archival/bzip2.c b/archival/bzip2.c index 38cc0219a..d0390a92a 100644 --- a/archival/bzip2.c +++ b/archival/bzip2.c | |||
@@ -145,7 +145,7 @@ IF_DESKTOP(long long) int bz_write(bz_stream *strm, void* rbuf, ssize_t rlen, vo | |||
145 | if (n2 != n) { | 145 | if (n2 != n) { |
146 | if (n2 >= 0) | 146 | if (n2 >= 0) |
147 | errno = 0; /* prevent bogus error message */ | 147 | errno = 0; /* prevent bogus error message */ |
148 | bb_perror_msg(n2 >= 0 ? "short write" : bb_msg_write_error); | 148 | bb_simple_perror_msg(n2 >= 0 ? "short write" : bb_msg_write_error); |
149 | return -1; | 149 | return -1; |
150 | } | 150 | } |
151 | } | 151 | } |
@@ -187,7 +187,7 @@ IF_DESKTOP(long long) int FAST_FUNC compressStream(transformer_state_t *xstate U | |||
187 | while (1) { | 187 | while (1) { |
188 | count = full_read(STDIN_FILENO, rbuf, IOBUF_SIZE); | 188 | count = full_read(STDIN_FILENO, rbuf, IOBUF_SIZE); |
189 | if (count < 0) { | 189 | if (count < 0) { |
190 | bb_perror_msg(bb_msg_read_error); | 190 | bb_simple_perror_msg(bb_msg_read_error); |
191 | total = -1; | 191 | total = -1; |
192 | break; | 192 | break; |
193 | } | 193 | } |
diff --git a/archival/dpkg.c b/archival/dpkg.c index ddb5daf09..da77fba05 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
@@ -487,7 +487,7 @@ static void add_split_dependencies(common_node_t *parent_node, const char *whole | |||
487 | } else if (strncmp(version, ">=", offset_ch) == 0) { | 487 | } else if (strncmp(version, ">=", offset_ch) == 0) { |
488 | edge->operator = VER_MORE_EQUAL; | 488 | edge->operator = VER_MORE_EQUAL; |
489 | } else { | 489 | } else { |
490 | bb_error_msg_and_die("illegal operator"); | 490 | bb_simple_error_msg_and_die("illegal operator"); |
491 | } | 491 | } |
492 | } | 492 | } |
493 | /* skip to start of version numbers */ | 493 | /* skip to start of version numbers */ |
@@ -730,7 +730,7 @@ static void set_status(const unsigned status_node_num, const char *new_value, co | |||
730 | status = new_value_num; | 730 | status = new_value_num; |
731 | break; | 731 | break; |
732 | default: | 732 | default: |
733 | bb_error_msg_and_die("DEBUG ONLY: this shouldnt happen"); | 733 | bb_simple_error_msg_and_die("DEBUG ONLY: this shouldnt happen"); |
734 | } | 734 | } |
735 | 735 | ||
736 | new_status = xasprintf("%s %s %s", name_hashtable[want], name_hashtable[flag], name_hashtable[status]); | 736 | new_status = xasprintf("%s %s %s", name_hashtable[want], name_hashtable[flag], name_hashtable[status]); |
@@ -944,10 +944,10 @@ static void write_status_file(deb_file_t **deb_file) | |||
944 | /* Create a separate backfile to dpkg */ | 944 | /* Create a separate backfile to dpkg */ |
945 | if (rename("/var/lib/dpkg/status", "/var/lib/dpkg/status.udeb.bak") == -1) { | 945 | if (rename("/var/lib/dpkg/status", "/var/lib/dpkg/status.udeb.bak") == -1) { |
946 | if (errno != ENOENT) | 946 | if (errno != ENOENT) |
947 | bb_error_msg_and_die("can't create backup status file"); | 947 | bb_simple_error_msg_and_die("can't create backup status file"); |
948 | /* Its ok if renaming the status file fails because status | 948 | /* Its ok if renaming the status file fails because status |
949 | * file doesn't exist, maybe we are starting from scratch */ | 949 | * file doesn't exist, maybe we are starting from scratch */ |
950 | bb_error_msg("no status file found, creating new one"); | 950 | bb_simple_error_msg("no status file found, creating new one"); |
951 | } | 951 | } |
952 | 952 | ||
953 | xrename("/var/lib/dpkg/status.udeb", "/var/lib/dpkg/status"); | 953 | xrename("/var/lib/dpkg/status.udeb", "/var/lib/dpkg/status"); |
@@ -1816,7 +1816,7 @@ int dpkg_main(int argc UNUSED_PARAM, char **argv) | |||
1816 | init_archive_deb_control(archive_handle); | 1816 | init_archive_deb_control(archive_handle); |
1817 | deb_file[deb_count]->control_file = deb_extract_control_file_to_buffer(archive_handle, control_list); | 1817 | deb_file[deb_count]->control_file = deb_extract_control_file_to_buffer(archive_handle, control_list); |
1818 | if (deb_file[deb_count]->control_file == NULL) { | 1818 | if (deb_file[deb_count]->control_file == NULL) { |
1819 | bb_error_msg_and_die("can't extract control file"); | 1819 | bb_simple_error_msg_and_die("can't extract control file"); |
1820 | } | 1820 | } |
1821 | deb_file[deb_count]->filename = xstrdup(argv[0]); | 1821 | deb_file[deb_count]->filename = xstrdup(argv[0]); |
1822 | package_num = fill_package_struct(deb_file[deb_count]->control_file); | 1822 | package_num = fill_package_struct(deb_file[deb_count]->control_file); |
@@ -1879,13 +1879,13 @@ int dpkg_main(int argc UNUSED_PARAM, char **argv) | |||
1879 | argv++; | 1879 | argv++; |
1880 | } | 1880 | } |
1881 | if (!deb_count) | 1881 | if (!deb_count) |
1882 | bb_error_msg_and_die("no package files specified"); | 1882 | bb_simple_error_msg_and_die("no package files specified"); |
1883 | deb_file[deb_count] = NULL; | 1883 | deb_file[deb_count] = NULL; |
1884 | 1884 | ||
1885 | /* Check that the deb file arguments are installable */ | 1885 | /* Check that the deb file arguments are installable */ |
1886 | if (!(opt & OPT_force_ignore_depends)) { | 1886 | if (!(opt & OPT_force_ignore_depends)) { |
1887 | if (!check_deps(deb_file, 0 /*, deb_count*/)) { | 1887 | if (!check_deps(deb_file, 0 /*, deb_count*/)) { |
1888 | bb_error_msg_and_die("dependency check failed"); | 1888 | bb_simple_error_msg_and_die("dependency check failed"); |
1889 | } | 1889 | } |
1890 | } | 1890 | } |
1891 | 1891 | ||
diff --git a/archival/gzip.c b/archival/gzip.c index 12c1df242..17341de45 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -99,7 +99,7 @@ aa: 85.1% -- replaced with aa.gz | |||
99 | /* Diagnostic functions */ | 99 | /* Diagnostic functions */ |
100 | #ifdef DEBUG | 100 | #ifdef DEBUG |
101 | static int verbose; | 101 | static int verbose; |
102 | # define Assert(cond,msg) { if (!(cond)) bb_error_msg(msg); } | 102 | # define Assert(cond,msg) { if (!(cond)) bb_simple_error_msg(msg); } |
103 | # define Trace(x) fprintf x | 103 | # define Trace(x) fprintf x |
104 | # define Tracev(x) {if (verbose) fprintf x; } | 104 | # define Tracev(x) {if (verbose) fprintf x; } |
105 | # define Tracevv(x) {if (verbose > 1) fprintf x; } | 105 | # define Tracevv(x) {if (verbose > 1) fprintf x; } |
@@ -787,7 +787,7 @@ static void check_match(IPos start, IPos match, int length) | |||
787 | /* check that the match is indeed a match */ | 787 | /* check that the match is indeed a match */ |
788 | if (memcmp(G1.window + match, G1.window + start, length) != 0) { | 788 | if (memcmp(G1.window + match, G1.window + start, length) != 0) { |
789 | bb_error_msg(" start %d, match %d, length %d", start, match, length); | 789 | bb_error_msg(" start %d, match %d, length %d", start, match, length); |
790 | bb_error_msg("invalid match"); | 790 | bb_simple_error_msg("invalid match"); |
791 | } | 791 | } |
792 | if (verbose > 1) { | 792 | if (verbose > 1) { |
793 | bb_error_msg("\\[%d,%d]", start - match, length); | 793 | bb_error_msg("\\[%d,%d]", start - match, length); |
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 7f9046b82..1ddce610c 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; |
@@ -1211,7 +1211,7 @@ unpack_gz_stream(transformer_state_t *xstate) | |||
1211 | 1211 | ||
1212 | if (full_read(xstate->src_fd, &magic2, 2) != 2) { | 1212 | if (full_read(xstate->src_fd, &magic2, 2) != 2) { |
1213 | bad_magic: | 1213 | bad_magic: |
1214 | bb_error_msg("invalid magic"); | 1214 | bb_simple_error_msg("invalid magic"); |
1215 | return -1; | 1215 | return -1; |
1216 | } | 1216 | } |
1217 | if (magic2 == COMPRESS_MAGIC) { | 1217 | if (magic2 == COMPRESS_MAGIC) { |
@@ -1233,7 +1233,7 @@ unpack_gz_stream(transformer_state_t *xstate) | |||
1233 | 1233 | ||
1234 | again: | 1234 | again: |
1235 | if (!check_header_gzip(PASS_STATE xstate)) { | 1235 | if (!check_header_gzip(PASS_STATE xstate)) { |
1236 | bb_error_msg("corrupted data"); | 1236 | bb_simple_error_msg("corrupted data"); |
1237 | total = -1; | 1237 | total = -1; |
1238 | goto ret; | 1238 | goto ret; |
1239 | } | 1239 | } |
@@ -1246,7 +1246,7 @@ unpack_gz_stream(transformer_state_t *xstate) | |||
1246 | total += n; | 1246 | total += n; |
1247 | 1247 | ||
1248 | if (!top_up(PASS_STATE 8)) { | 1248 | if (!top_up(PASS_STATE 8)) { |
1249 | bb_error_msg("corrupted data"); | 1249 | bb_simple_error_msg("corrupted data"); |
1250 | total = -1; | 1250 | total = -1; |
1251 | goto ret; | 1251 | goto ret; |
1252 | } | 1252 | } |
@@ -1254,7 +1254,7 @@ unpack_gz_stream(transformer_state_t *xstate) | |||
1254 | /* Validate decompression - crc */ | 1254 | /* Validate decompression - crc */ |
1255 | v32 = buffer_read_le_u32(PASS_STATE_ONLY); | 1255 | v32 = buffer_read_le_u32(PASS_STATE_ONLY); |
1256 | if ((~gunzip_crc) != v32) { | 1256 | if ((~gunzip_crc) != v32) { |
1257 | bb_error_msg("crc error"); | 1257 | bb_simple_error_msg("crc error"); |
1258 | total = -1; | 1258 | total = -1; |
1259 | goto ret; | 1259 | goto ret; |
1260 | } | 1260 | } |
@@ -1262,7 +1262,7 @@ unpack_gz_stream(transformer_state_t *xstate) | |||
1262 | /* Validate decompression - size */ | 1262 | /* Validate decompression - size */ |
1263 | v32 = buffer_read_le_u32(PASS_STATE_ONLY); | 1263 | v32 = buffer_read_le_u32(PASS_STATE_ONLY); |
1264 | if ((uint32_t)gunzip_bytes_out != v32) { | 1264 | if ((uint32_t)gunzip_bytes_out != v32) { |
1265 | bb_error_msg("incorrect length"); | 1265 | bb_simple_error_msg("incorrect length"); |
1266 | total = -1; | 1266 | total = -1; |
1267 | } | 1267 | } |
1268 | 1268 | ||
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 a90f42a45..44715ef25 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 | } |
@@ -205,7 +205,7 @@ static transformer_state_t *setup_transformer_on_fd(int fd, int fail_if_not_comp | |||
205 | 205 | ||
206 | /* No known magic seen */ | 206 | /* No known magic seen */ |
207 | if (fail_if_not_compressed) | 207 | if (fail_if_not_compressed) |
208 | bb_error_msg_and_die("no gzip" | 208 | bb_simple_error_msg_and_die("no gzip" |
209 | IF_FEATURE_SEAMLESS_BZ2("/bzip2") | 209 | IF_FEATURE_SEAMLESS_BZ2("/bzip2") |
210 | IF_FEATURE_SEAMLESS_XZ("/xz") | 210 | IF_FEATURE_SEAMLESS_XZ("/xz") |
211 | " magic"); | 211 | " 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 | ||
diff --git a/archival/lzop.c b/archival/lzop.c index 585632c4e..bdd21598c 100644 --- a/archival/lzop.c +++ b/archival/lzop.c | |||
@@ -752,7 +752,7 @@ static FAST_FUNC void lzo_check( | |||
752 | */ | 752 | */ |
753 | uint32_t c = fn(init, buf, len); | 753 | uint32_t c = fn(init, buf, len); |
754 | if (c != ref) | 754 | if (c != ref) |
755 | bb_error_msg_and_die("checksum error"); | 755 | bb_simple_error_msg_and_die("checksum error"); |
756 | } | 756 | } |
757 | 757 | ||
758 | /**********************************************************************/ | 758 | /**********************************************************************/ |
@@ -785,15 +785,15 @@ static NOINLINE int lzo_decompress(uint32_t h_flags32) | |||
785 | /* error if split file */ | 785 | /* error if split file */ |
786 | if (dst_len == 0xffffffffL) | 786 | if (dst_len == 0xffffffffL) |
787 | /* should not happen - not yet implemented */ | 787 | /* should not happen - not yet implemented */ |
788 | bb_error_msg_and_die("this file is a split lzop file"); | 788 | bb_simple_error_msg_and_die("this file is a split lzop file"); |
789 | 789 | ||
790 | if (dst_len > MAX_BLOCK_SIZE) | 790 | if (dst_len > MAX_BLOCK_SIZE) |
791 | bb_error_msg_and_die("corrupted data"); | 791 | bb_simple_error_msg_and_die("corrupted data"); |
792 | 792 | ||
793 | /* read compressed block size */ | 793 | /* read compressed block size */ |
794 | src_len = read32(); | 794 | src_len = read32(); |
795 | if (src_len <= 0 || src_len > dst_len) | 795 | if (src_len <= 0 || src_len > dst_len) |
796 | bb_error_msg_and_die("corrupted data"); | 796 | bb_simple_error_msg_and_die("corrupted data"); |
797 | 797 | ||
798 | if (dst_len > block_size) { | 798 | if (dst_len > block_size) { |
799 | if (b2) { | 799 | if (b2) { |
@@ -846,7 +846,7 @@ static NOINLINE int lzo_decompress(uint32_t h_flags32) | |||
846 | r = lzo1x_decompress_safe(b1, src_len, b2, &d /*, NULL*/); | 846 | r = lzo1x_decompress_safe(b1, src_len, b2, &d /*, NULL*/); |
847 | 847 | ||
848 | if (r != 0 /*LZO_E_OK*/ || dst_len != d) { | 848 | if (r != 0 /*LZO_E_OK*/ || dst_len != d) { |
849 | bb_error_msg_and_die("corrupted data"); | 849 | bb_simple_error_msg_and_die("corrupted data"); |
850 | } | 850 | } |
851 | dst = b2; | 851 | dst = b2; |
852 | } else { | 852 | } else { |
@@ -913,7 +913,7 @@ static void check_magic(void) | |||
913 | unsigned char magic[sizeof(lzop_magic)]; | 913 | unsigned char magic[sizeof(lzop_magic)]; |
914 | xread(0, magic, sizeof(magic)); | 914 | xread(0, magic, sizeof(magic)); |
915 | if (memcmp(magic, lzop_magic, sizeof(lzop_magic)) != 0) | 915 | if (memcmp(magic, lzop_magic, sizeof(lzop_magic)) != 0) |
916 | bb_error_msg_and_die("bad magic number"); | 916 | bb_simple_error_msg_and_die("bad magic number"); |
917 | } | 917 | } |
918 | 918 | ||
919 | /**********************************************************************/ | 919 | /**********************************************************************/ |
@@ -1049,7 +1049,7 @@ static void lzo_set_method(header_t *h) | |||
1049 | else if (option_mask32 & OPT_8) | 1049 | else if (option_mask32 & OPT_8) |
1050 | level = 8; | 1050 | level = 8; |
1051 | #else | 1051 | #else |
1052 | bb_error_msg_and_die("high compression not compiled in"); | 1052 | bb_simple_error_msg_and_die("high compression not compiled in"); |
1053 | #endif | 1053 | #endif |
1054 | } | 1054 | } |
1055 | 1055 | ||
diff --git a/archival/rpm.c b/archival/rpm.c index 95b2531e8..68afba914 100644 --- a/archival/rpm.c +++ b/archival/rpm.c | |||
@@ -543,7 +543,7 @@ int rpm2cpio_main(int argc UNUSED_PARAM, char **argv) | |||
543 | } | 543 | } |
544 | 544 | ||
545 | if (bb_copyfd_eof(rpm_fd, STDOUT_FILENO) < 0) | 545 | if (bb_copyfd_eof(rpm_fd, STDOUT_FILENO) < 0) |
546 | bb_error_msg_and_die("error unpacking"); | 546 | bb_simple_error_msg_and_die("error unpacking"); |
547 | 547 | ||
548 | if (ENABLE_FEATURE_CLEAN_UP) { | 548 | if (ENABLE_FEATURE_CLEAN_UP) { |
549 | close(rpm_fd); | 549 | close(rpm_fd); |
diff --git a/archival/tar.c b/archival/tar.c index 3ef89fb0a..ca802f73c 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -369,7 +369,7 @@ static int writeTarHeader(struct TarBallInfo *tbInfo, | |||
369 | /* If it is larger than 100 bytes, bail out */ | 369 | /* If it is larger than 100 bytes, bail out */ |
370 | if (header.linkname[sizeof(header.linkname)-1]) { | 370 | if (header.linkname[sizeof(header.linkname)-1]) { |
371 | free(lpath); | 371 | free(lpath); |
372 | bb_error_msg("names longer than "NAME_SIZE_STR" chars not supported"); | 372 | bb_simple_error_msg("names longer than "NAME_SIZE_STR" chars not supported"); |
373 | return FALSE; | 373 | return FALSE; |
374 | } | 374 | } |
375 | # endif | 375 | # endif |
@@ -542,7 +542,7 @@ static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statb | |||
542 | 542 | ||
543 | # if !ENABLE_FEATURE_TAR_GNU_EXTENSIONS | 543 | # if !ENABLE_FEATURE_TAR_GNU_EXTENSIONS |
544 | if (strlen(header_name) >= NAME_SIZE) { | 544 | if (strlen(header_name) >= NAME_SIZE) { |
545 | bb_error_msg("names longer than "NAME_SIZE_STR" chars not supported"); | 545 | bb_simple_error_msg("names longer than "NAME_SIZE_STR" chars not supported"); |
546 | return TRUE; | 546 | return TRUE; |
547 | } | 547 | } |
548 | # endif | 548 | # endif |
@@ -715,13 +715,13 @@ static NOINLINE int writeTarFile( | |||
715 | freeHardLinkInfo(&tbInfo->hlInfoHead); | 715 | freeHardLinkInfo(&tbInfo->hlInfoHead); |
716 | 716 | ||
717 | if (errorFlag) | 717 | if (errorFlag) |
718 | bb_error_msg("error exit delayed from previous errors"); | 718 | bb_simple_error_msg("error exit delayed from previous errors"); |
719 | 719 | ||
720 | # if SEAMLESS_COMPRESSION | 720 | # if SEAMLESS_COMPRESSION |
721 | if (gzip) { | 721 | if (gzip) { |
722 | int status; | 722 | int status; |
723 | if (safe_waitpid(-1, &status, 0) == -1) | 723 | if (safe_waitpid(-1, &status, 0) == -1) |
724 | bb_perror_msg("waitpid"); | 724 | bb_simple_perror_msg("waitpid"); |
725 | else if (!WIFEXITED(status) || WEXITSTATUS(status)) | 725 | else if (!WIFEXITED(status) || WEXITSTATUS(status)) |
726 | /* gzip was killed or has exited with nonzero! */ | 726 | /* gzip was killed or has exited with nonzero! */ |
727 | errorFlag = TRUE; | 727 | errorFlag = TRUE; |
@@ -1150,7 +1150,7 @@ int tar_main(int argc UNUSED_PARAM, char **argv) | |||
1150 | if (opt & OPT_CREATE) { | 1150 | if (opt & OPT_CREATE) { |
1151 | /* Make sure there is at least one file to tar up */ | 1151 | /* Make sure there is at least one file to tar up */ |
1152 | if (tar_handle->accept == NULL) | 1152 | if (tar_handle->accept == NULL) |
1153 | bb_error_msg_and_die("empty archive"); | 1153 | bb_simple_error_msg_and_die("empty archive"); |
1154 | 1154 | ||
1155 | tar_fd = STDOUT_FILENO; | 1155 | tar_fd = STDOUT_FILENO; |
1156 | /* Mimicking GNU tar 1.15.1: */ | 1156 | /* Mimicking GNU tar 1.15.1: */ |
diff --git a/archival/unzip.c b/archival/unzip.c index 466794031..8c4cb9881 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -322,7 +322,7 @@ static uint32_t read_next_cdf(uint32_t cdf_offset, cdf_header_t *cdf) | |||
322 | static void die_if_bad_fnamesize(unsigned sz) | 322 | static void die_if_bad_fnamesize(unsigned sz) |
323 | { | 323 | { |
324 | if (sz > 0xfff) /* more than 4k?! no funny business please */ | 324 | if (sz > 0xfff) /* more than 4k?! no funny business please */ |
325 | bb_error_msg_and_die("bad archive"); | 325 | bb_simple_error_msg_and_die("bad archive"); |
326 | } | 326 | } |
327 | 327 | ||
328 | static void unzip_skip(off_t skip) | 328 | static void unzip_skip(off_t skip) |
@@ -359,7 +359,7 @@ static void unzip_extract_symlink(llist_t **symlink_placeholders, | |||
359 | xread(zip_fd, target, zip->fmt.ucmpsize); | 359 | xread(zip_fd, target, zip->fmt.ucmpsize); |
360 | } else { | 360 | } else { |
361 | #if 1 | 361 | #if 1 |
362 | bb_error_msg_and_die("compressed symlink is not supported"); | 362 | bb_simple_error_msg_and_die("compressed symlink is not supported"); |
363 | #else | 363 | #else |
364 | transformer_state_t xstate; | 364 | transformer_state_t xstate; |
365 | init_transformer_state(&xstate); | 365 | init_transformer_state(&xstate); |
@@ -399,10 +399,10 @@ static void unzip_extract(zip_header_t *zip, int dst_fd) | |||
399 | if (zip->fmt.method == 8) { | 399 | if (zip->fmt.method == 8) { |
400 | /* Method 8 - inflate */ | 400 | /* Method 8 - inflate */ |
401 | if (inflate_unzip(&xstate) < 0) | 401 | if (inflate_unzip(&xstate) < 0) |
402 | bb_error_msg_and_die("inflate error"); | 402 | bb_simple_error_msg_and_die("inflate error"); |
403 | /* Validate decompression - crc */ | 403 | /* Validate decompression - crc */ |
404 | if (zip->fmt.crc32 != (xstate.crc32 ^ 0xffffffffL)) { | 404 | if (zip->fmt.crc32 != (xstate.crc32 ^ 0xffffffffL)) { |
405 | bb_error_msg_and_die("crc error"); | 405 | bb_simple_error_msg_and_die("crc error"); |
406 | } | 406 | } |
407 | } | 407 | } |
408 | #if ENABLE_FEATURE_UNZIP_BZIP2 | 408 | #if ENABLE_FEATURE_UNZIP_BZIP2 |
@@ -412,7 +412,7 @@ static void unzip_extract(zip_header_t *zip, int dst_fd) | |||
412 | */ | 412 | */ |
413 | xstate.bytes_out = unpack_bz2_stream(&xstate); | 413 | xstate.bytes_out = unpack_bz2_stream(&xstate); |
414 | if (xstate.bytes_out < 0) | 414 | if (xstate.bytes_out < 0) |
415 | bb_error_msg_and_die("inflate error"); | 415 | bb_simple_error_msg_and_die("inflate error"); |
416 | } | 416 | } |
417 | #endif | 417 | #endif |
418 | #if ENABLE_FEATURE_UNZIP_LZMA | 418 | #if ENABLE_FEATURE_UNZIP_LZMA |
@@ -420,7 +420,7 @@ static void unzip_extract(zip_header_t *zip, int dst_fd) | |||
420 | /* Not tested yet */ | 420 | /* Not tested yet */ |
421 | xstate.bytes_out = unpack_lzma_stream(&xstate); | 421 | xstate.bytes_out = unpack_lzma_stream(&xstate); |
422 | if (xstate.bytes_out < 0) | 422 | if (xstate.bytes_out < 0) |
423 | bb_error_msg_and_die("inflate error"); | 423 | bb_simple_error_msg_and_die("inflate error"); |
424 | } | 424 | } |
425 | #endif | 425 | #endif |
426 | #if ENABLE_FEATURE_UNZIP_XZ | 426 | #if ENABLE_FEATURE_UNZIP_XZ |
@@ -428,7 +428,7 @@ static void unzip_extract(zip_header_t *zip, int dst_fd) | |||
428 | /* Not tested yet */ | 428 | /* Not tested yet */ |
429 | xstate.bytes_out = unpack_xz_stream(&xstate); | 429 | xstate.bytes_out = unpack_xz_stream(&xstate); |
430 | if (xstate.bytes_out < 0) | 430 | if (xstate.bytes_out < 0) |
431 | bb_error_msg_and_die("inflate error"); | 431 | bb_simple_error_msg_and_die("inflate error"); |
432 | } | 432 | } |
433 | #endif | 433 | #endif |
434 | else { | 434 | else { |
@@ -439,7 +439,7 @@ static void unzip_extract(zip_header_t *zip, int dst_fd) | |||
439 | if (zip->fmt.ucmpsize != xstate.bytes_out) { | 439 | if (zip->fmt.ucmpsize != xstate.bytes_out) { |
440 | /* Don't die. Who knows, maybe len calculation | 440 | /* Don't die. Who knows, maybe len calculation |
441 | * was botched somewhere. After all, crc matched! */ | 441 | * was botched somewhere. After all, crc matched! */ |
442 | bb_error_msg("bad length"); | 442 | bb_simple_error_msg("bad length"); |
443 | } | 443 | } |
444 | } | 444 | } |
445 | 445 | ||
@@ -447,7 +447,7 @@ static void my_fgets80(char *buf80) | |||
447 | { | 447 | { |
448 | fflush_all(); | 448 | fflush_all(); |
449 | if (!fgets(buf80, 80, stdin)) { | 449 | if (!fgets(buf80, 80, stdin)) { |
450 | bb_perror_msg_and_die("can't read standard input"); | 450 | bb_simple_perror_msg_and_die("can't read standard input"); |
451 | } | 451 | } |
452 | } | 452 | } |
453 | 453 | ||