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/gunzip.c | |
parent | 98ae2160b62b99424e5793e97d5abd4e3c2e576b (diff) | |
download | busybox-w32-9c267b851e54441b867293973fd5a898b847df39.tar.gz busybox-w32-9c267b851e54441b867293973fd5a898b847df39.tar.bz2 busybox-w32-9c267b851e54441b867293973fd5a898b847df39.zip |
style fixes
Diffstat (limited to 'archival/gunzip.c')
-rw-r--r-- | archival/gunzip.c | 7 |
1 files changed, 3 insertions, 4 deletions
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 */ |