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-9c267b851e54441b867293973fd5a898b847df39.tar.gz |
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) /* Check that the input is sane. */ if (isatty(src_fd) && (opt & BUNZIP2_OPT_FORCE) == 0) { - bb_error_msg_and_die("Compressed data not read from terminal. " - "Use -f to force it."); + bb_error_msg_and_die("compressed data not read from terminal, " + "use -f to force it"); } 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) optind = argc; /* we don't handle "gunzip - a.gz b.gz" */ } else { src_fd = xopen(old_path, O_RDONLY); - /* Get the time stamp on the input file. */ - xstat(old_path, &stat_buf); + fstat(src_fd, &stat_buf); } /* Check that the input is sane. */ @@ -131,11 +130,11 @@ int gunzip_main(int argc, char **argv) } else if (ENABLE_DESKTOP && (opt & GUNZIP_OPT_VERBOSE)) { fprintf(stderr, "%s: %u%% - replaced with %s\n", - // TODO: LARGEFILE support for stat_buf.st_size? old_path, (unsigned)(stat_buf.st_size*100 / (status+1)), new_path); } } else { - bb_error_msg("invalid magic"); exitcode = 1; + bb_error_msg("invalid magic"); + exitcode = 1; } if (status < 0 && new_path) { /* Unzip failed, remove new path instead of old path */ |