summaryrefslogtreecommitdiff
path: root/archival/bunzip2.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-09-27 23:31:08 +0000
committerDenis Vlasenko2006-09-27 23:31:08 +0000
commitce97960a6e7da4d9fc7a003c9138aec5e4e55a96 (patch)
treec85ed57fad4e98e833f16d5657efce53acc79895 /archival/bunzip2.c
parentc16bd212e341598452b7885d9e4ac2064f417673 (diff)
downloadbusybox-ce97960a6e7da4d9fc7a003c9138aec5e4e55a96.zip
busybox-ce97960a6e7da4d9fc7a003c9138aec5e4e55a96.tar.gz
usage.h: remove ugly tricks. We have USE_FEATURE_xxx now.
Few bugs are now exposed...
Diffstat (limited to 'archival/bunzip2.c')
-rw-r--r--archival/bunzip2.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/archival/bunzip2.c b/archival/bunzip2.c
index 9810e02..62f2858 100644
--- a/archival/bunzip2.c
+++ b/archival/bunzip2.c
@@ -36,7 +36,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) {
@@ -45,7 +46,7 @@ int bunzip2_main(int argc, char **argv)
* strlen may be less than 4 */
char *extension = strrchr(filename, '.');
if (!extension || strcmp(extension, ".bz2") != 0) {
- bb_error_msg_and_die("Invalid extension");
+ bb_error_msg_and_die("invalid extension");
}
xstat(filename, &stat_buf);
*extension = '\0';
@@ -53,10 +54,10 @@ int bunzip2_main(int argc, char **argv)
stat_buf.st_mode);
} else dst_fd = STDOUT_FILENO;
status = uncompressStream(src_fd, dst_fd);
- if(filename) {
+ if (filename) {
if (!status) filename[strlen(filename)] = '.';
if (unlink(filename) < 0) {
- bb_error_msg_and_die("Couldn't remove %s", filename);
+ bb_error_msg_and_die("cannot remove %s", filename);
}
}