diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-12 20:06:18 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-12 20:06:18 +0000 |
commit | 9c267b851e54441b867293973fd5a898b847df39 (patch) | |
tree | c238cf9dfb9933506f7067011ac696794df1906a /archival | |
parent | 98ae2160b62b99424e5793e97d5abd4e3c2e576b (diff) | |
download | busybox-w32-9c267b851e54441b867293973fd5a898b847df39.tar.gz busybox-w32-9c267b851e54441b867293973fd5a898b847df39.tar.bz2 busybox-w32-9c267b851e54441b867293973fd5a898b847df39.zip |
style fixes
Diffstat (limited to 'archival')
-rw-r--r-- | archival/bunzip2.c | 4 | ||||
-rw-r--r-- | archival/gunzip.c | 7 |
2 files changed, 5 insertions, 6 deletions
diff --git a/archival/bunzip2.c b/archival/bunzip2.c index 85f2343df..757001fe4 100644 --- a/archival/bunzip2.c +++ b/archival/bunzip2.c | |||
@@ -37,8 +37,8 @@ int bunzip2_main(int argc, char **argv) | |||
37 | 37 | ||
38 | /* Check that the input is sane. */ | 38 | /* Check that the input is sane. */ |
39 | if (isatty(src_fd) && (opt & BUNZIP2_OPT_FORCE) == 0) { | 39 | if (isatty(src_fd) && (opt & BUNZIP2_OPT_FORCE) == 0) { |
40 | bb_error_msg_and_die("Compressed data not read from terminal. " | 40 | bb_error_msg_and_die("compressed data not read from terminal, " |
41 | "Use -f to force it."); | 41 | "use -f to force it"); |
42 | } | 42 | } |
43 | 43 | ||
44 | if (filename) { | 44 | if (filename) { |
diff --git a/archival/gunzip.c b/archival/gunzip.c index 396ce4f5c..e24401c71 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c | |||
@@ -65,9 +65,8 @@ int gunzip_main(int argc, char **argv) | |||
65 | optind = argc; /* we don't handle "gunzip - a.gz b.gz" */ | 65 | optind = argc; /* we don't handle "gunzip - a.gz b.gz" */ |
66 | } else { | 66 | } else { |
67 | src_fd = xopen(old_path, O_RDONLY); | 67 | src_fd = xopen(old_path, O_RDONLY); |
68 | |||
69 | /* Get the time stamp on the input file. */ | 68 | /* Get the time stamp on the input file. */ |
70 | xstat(old_path, &stat_buf); | 69 | fstat(src_fd, &stat_buf); |
71 | } | 70 | } |
72 | 71 | ||
73 | /* Check that the input is sane. */ | 72 | /* Check that the input is sane. */ |
@@ -131,11 +130,11 @@ int gunzip_main(int argc, char **argv) | |||
131 | } | 130 | } |
132 | else if (ENABLE_DESKTOP && (opt & GUNZIP_OPT_VERBOSE)) { | 131 | else if (ENABLE_DESKTOP && (opt & GUNZIP_OPT_VERBOSE)) { |
133 | fprintf(stderr, "%s: %u%% - replaced with %s\n", | 132 | fprintf(stderr, "%s: %u%% - replaced with %s\n", |
134 | // TODO: LARGEFILE support for stat_buf.st_size? | ||
135 | old_path, (unsigned)(stat_buf.st_size*100 / (status+1)), new_path); | 133 | old_path, (unsigned)(stat_buf.st_size*100 / (status+1)), new_path); |
136 | } | 134 | } |
137 | } else { | 135 | } else { |
138 | bb_error_msg("invalid magic"); exitcode = 1; | 136 | bb_error_msg("invalid magic"); |
137 | exitcode = 1; | ||
139 | } | 138 | } |
140 | if (status < 0 && new_path) { | 139 | if (status < 0 && new_path) { |
141 | /* Unzip failed, remove new path instead of old path */ | 140 | /* Unzip failed, remove new path instead of old path */ |