aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--toys/bzcat.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/toys/bzcat.c b/toys/bzcat.c
index d540524d..b8e16958 100644
--- a/toys/bzcat.c
+++ b/toys/bzcat.c
@@ -10,7 +10,7 @@ USE_BZCAT(NEWTOY(bzcat, NULL, TOYFLAG_USR|TOYFLAG_BIN))
config BZCAT
bool "bzcat"
- default n
+ default y
help
usage: bzcat [filename...]
@@ -19,7 +19,12 @@ config BZCAT
#include "toys.h"
+static void do_bzcat(int fd, char *name)
+{
+ bunzipStream(fd, 1);
+}
+
void bzcat_main(void)
{
- bunzipStream(0, 1);
+ loopfiles(toys.optargs, do_bzcat);
}