Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-01 19:55:11 +0400
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-01 19:55:11 +0400
commit97a8dd3857aea9730382e2975a2ee2000fd23ebb (patch)
tree608f73898f3ed5f466dff68189625fa9328a15be /archival/bunzip2.c
parentf8aa109a9f7c67b291f240fb3ed91da90f26359b (diff)
g[un]zip: add support for -v (verbose).
Add CONFIG_DESKTOP, almost all bloat from this change is hidden under that.
Diffstat (limited to 'archival/bunzip2.c')
-rw-r--r--archival/bunzip2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/archival/bunzip2.c b/archival/bunzip2.c
index 62f28582c..9d62366c3 100644
--- a/archival/bunzip2.c
+++ b/archival/bunzip2.c
@@ -14,9 +14,10 @@
int bunzip2_main(int argc, char **argv)
{
+ USE_DESKTOP(long long) int status;
char *filename;
unsigned long opt;
- int status, src_fd, dst_fd;
+ int src_fd, dst_fd;
opt = bb_getopt_ulflags(argc, argv, "cf");
@@ -55,7 +56,7 @@ int bunzip2_main(int argc, char **argv)
} else dst_fd = STDOUT_FILENO;
status = uncompressStream(src_fd, dst_fd);
if (filename) {
- if (!status) filename[strlen(filename)] = '.';
+ if (status >= 0) filename[strlen(filename)] = '.';
if (unlink(filename) < 0) {
bb_error_msg_and_die("cannot remove %s", filename);
}