aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
Diffstat (limited to 'archival')
-rw-r--r--archival/unzip.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/archival/unzip.c b/archival/unzip.c
index 2aa380dc8..8b1c281c4 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -222,7 +222,7 @@ int unzip_main(int argc, char **argv)
222 if (magic == ZIP_CDS_MAGIC) { 222 if (magic == ZIP_CDS_MAGIC) {
223 break; 223 break;
224 } else if (magic != ZIP_FILEHEADER_MAGIC) { 224 } else if (magic != ZIP_FILEHEADER_MAGIC) {
225 bb_error_msg_and_die("Invalid zip magic %08X", magic); 225 bb_error_msg_and_die("invalid zip magic %08X", magic);
226 } 226 }
227 227
228 /* Read the file header */ 228 /* Read the file header */
@@ -238,7 +238,7 @@ int unzip_main(int argc, char **argv)
238 zip_header.formatted.filename_len = SWAP_LE32(zip_header.formatted.filename_len); 238 zip_header.formatted.filename_len = SWAP_LE32(zip_header.formatted.filename_len);
239 zip_header.formatted.extra_len = SWAP_LE32(zip_header.formatted.extra_len); 239 zip_header.formatted.extra_len = SWAP_LE32(zip_header.formatted.extra_len);
240 if ((zip_header.formatted.method != 0) && (zip_header.formatted.method != 8)) { 240 if ((zip_header.formatted.method != 0) && (zip_header.formatted.method != 8)) {
241 bb_error_msg_and_die("Unsupported compression method %d", zip_header.formatted.method); 241 bb_error_msg_and_die("unsupported compression method %d", zip_header.formatted.method);
242 } 242 }
243 243
244 /* Read filename */ 244 /* Read filename */
@@ -251,7 +251,7 @@ int unzip_main(int argc, char **argv)
251 251
252 if ((verbosity == v_list) && !list_header_done){ 252 if ((verbosity == v_list) && !list_header_done){
253 printf(" Length Date Time Name\n" 253 printf(" Length Date Time Name\n"
254 " -------- ---- ---- ----\n"); 254 " -------- ---- ---- ----\n");
255 list_header_done = 1; 255 list_header_done = 1;
256 } 256 }
257 257
@@ -282,14 +282,14 @@ int unzip_main(int argc, char **argv)
282 } else if (last_char_is(dst_fn, '/')) { /* Extract directory */ 282 } else if (last_char_is(dst_fn, '/')) { /* Extract directory */
283 if (stat(dst_fn, &stat_buf) == -1) { 283 if (stat(dst_fn, &stat_buf) == -1) {
284 if (errno != ENOENT) { 284 if (errno != ENOENT) {
285 bb_perror_msg_and_die("Cannot stat '%s'",dst_fn); 285 bb_perror_msg_and_die("cannot stat '%s'",dst_fn);
286 } 286 }
287 if (verbosity == v_normal) { 287 if (verbosity == v_normal) {
288 printf(" creating: %s\n", dst_fn); 288 printf(" creating: %s\n", dst_fn);
289 } 289 }
290 unzip_create_leading_dirs(dst_fn); 290 unzip_create_leading_dirs(dst_fn);
291 if (bb_make_directory(dst_fn, 0777, 0)) { 291 if (bb_make_directory(dst_fn, 0777, 0)) {
292 bb_error_msg_and_die("Exiting"); 292 bb_error_msg_and_die("exiting");
293 } 293 }
294 } else { 294 } else {
295 if (!S_ISDIR(stat_buf.st_mode)) { 295 if (!S_ISDIR(stat_buf.st_mode)) {
@@ -302,7 +302,7 @@ int unzip_main(int argc, char **argv)
302 _check_file: 302 _check_file:
303 if (stat(dst_fn, &stat_buf) == -1) { /* File does not exist */ 303 if (stat(dst_fn, &stat_buf) == -1) { /* File does not exist */
304 if (errno != ENOENT) { 304 if (errno != ENOENT) {
305 bb_perror_msg_and_die("Cannot stat '%s'",dst_fn); 305 bb_perror_msg_and_die("cannot stat '%s'",dst_fn);
306 } 306 }
307 i = 'y'; 307 i = 'y';
308 308
@@ -316,7 +316,7 @@ int unzip_main(int argc, char **argv)
316 } else { 316 } else {
317 printf("replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", dst_fn); 317 printf("replace %s? [y]es, [n]o, [A]ll, [N]one, [r]ename: ", dst_fn);
318 if (!fgets(key_buf, 512, stdin)) { 318 if (!fgets(key_buf, 512, stdin)) {
319 bb_perror_msg_and_die("Cannot read input"); 319 bb_perror_msg_and_die("cannot read input");
320 } 320 }
321 i = key_buf[0]; 321 i = key_buf[0];
322 } 322 }
@@ -358,7 +358,7 @@ int unzip_main(int argc, char **argv)
358 /* Prompt for new name */ 358 /* Prompt for new name */
359 printf("new name: "); 359 printf("new name: ");
360 if (!fgets(key_buf, 512, stdin)) { 360 if (!fgets(key_buf, 512, stdin)) {
361 bb_perror_msg_and_die("Cannot read input"); 361 bb_perror_msg_and_die("cannot read input");
362 } 362 }
363 free(dst_fn); 363 free(dst_fn);
364 dst_fn = xstrdup(key_buf); 364 dst_fn = xstrdup(key_buf);