diff options
author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-06-07 20:17:41 +0000 |
---|---|---|
committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-06-07 20:17:41 +0000 |
commit | f4532f9fd377898c339aaa81cde66c14808248dd (patch) | |
tree | 6e35288c247102998a775cbc16f9ec014e00e7fd /archival/unzip.c | |
parent | 2ce533f0b2a79abdfb07d8879afe08f697278158 (diff) | |
download | busybox-w32-f4532f9fd377898c339aaa81cde66c14808248dd.tar.gz busybox-w32-f4532f9fd377898c339aaa81cde66c14808248dd.tar.bz2 busybox-w32-f4532f9fd377898c339aaa81cde66c14808248dd.zip |
- reuse strings and messages. Saves about 600B
git-svn-id: svn://busybox.net/trunk/busybox@15325 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'archival/unzip.c')
-rw-r--r-- | archival/unzip.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/archival/unzip.c b/archival/unzip.c index c6ef9a183..8ba39e9af 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -86,7 +86,7 @@ static void unzip_skip(int fd, off_t skip) | |||
86 | static void unzip_read(int fd, void *buf, size_t count) | 86 | static void unzip_read(int fd, void *buf, size_t count) |
87 | { | 87 | { |
88 | if (bb_xread(fd, buf, count) != count) { | 88 | if (bb_xread(fd, buf, count) != count) { |
89 | bb_error_msg_and_die("Read failure"); | 89 | bb_error_msg_and_die(bb_msg_read_error); |
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
@@ -95,7 +95,7 @@ static void unzip_create_leading_dirs(char *fn) | |||
95 | /* Create all leading directories */ | 95 | /* Create all leading directories */ |
96 | char *name = bb_xstrdup(fn); | 96 | char *name = bb_xstrdup(fn); |
97 | if (bb_make_directory(dirname(name), 0777, FILEUTILS_RECUR)) { | 97 | if (bb_make_directory(dirname(name), 0777, FILEUTILS_RECUR)) { |
98 | bb_error_msg_and_die("Failed to create directory"); | 98 | bb_error_msg_and_die("Exiting"); /* bb_make_directory is noisy */ |
99 | } | 99 | } |
100 | free(name); | 100 | free(name); |
101 | } | 101 | } |
@@ -282,8 +282,8 @@ int unzip_main(int argc, char **argv) | |||
282 | unzip_skip(src_fd, zip_header.formated.extra_len); | 282 | unzip_skip(src_fd, zip_header.formated.extra_len); |
283 | 283 | ||
284 | if ((verbosity == v_list) && !list_header_done){ | 284 | if ((verbosity == v_list) && !list_header_done){ |
285 | printf(" Length Date Time Name\n"); | 285 | printf(" Length Date Time Name\n" |
286 | printf(" -------- ---- ---- ----\n"); | 286 | " -------- ---- ---- ----\n"); |
287 | list_header_done = 1; | 287 | list_header_done = 1; |
288 | } | 288 | } |
289 | 289 | ||
@@ -321,7 +321,7 @@ int unzip_main(int argc, char **argv) | |||
321 | } | 321 | } |
322 | unzip_create_leading_dirs(dst_fn); | 322 | unzip_create_leading_dirs(dst_fn); |
323 | if (bb_make_directory(dst_fn, 0777, 0)) { | 323 | if (bb_make_directory(dst_fn, 0777, 0)) { |
324 | bb_error_msg_and_die("Failed to create directory"); | 324 | bb_error_msg_and_die("Exiting"); |
325 | } | 325 | } |
326 | } else { | 326 | } else { |
327 | if (!S_ISDIR(stat_buf.st_mode)) { | 327 | if (!S_ISDIR(stat_buf.st_mode)) { |