summaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenys Vlasenko2014-02-02 02:06:38 +0100
committerDenys Vlasenko2014-02-02 02:06:38 +0100
commit640ce3de07807133796bccd0bdfa146bbfc788c7 (patch)
tree0d17e53405b8cbf71aed4d8ba6c9dc27df14814a /miscutils
parentf1999b5a9d2788cdc120b1ee2ab1de18e95b38f2 (diff)
downloadbusybox-640ce3de07807133796bccd0bdfa146bbfc788c7.zip
busybox-640ce3de07807133796bccd0bdfa146bbfc788c7.tar.gz
zcat: complain if input is not compressed
function old new delta buffer_fill_and_print 178 191 +13 varvalue 735 743 +8 bbunpack 747 755 +8 open_zipped 85 89 +4 xmalloc_open_zipped_read_close 61 63 +2 get_addr_1 240 242 +2 fbsplash_main 1228 1230 +2 pstree_main 322 321 -1 builtin_type 121 119 -2 do_load 954 926 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/3 up/down: 39/-31) Total: 8 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/fbsplash.c2
-rw-r--r--miscutils/man.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c
index 12a77b7..7b695b2 100644
--- a/miscutils/fbsplash.c
+++ b/miscutils/fbsplash.c
@@ -353,7 +353,7 @@ static void fb_drawimage(void)
if (LONE_DASH(G.image_filename)) {
theme_file = stdin;
} else {
- int fd = open_zipped(G.image_filename);
+ int fd = open_zipped(G.image_filename, /*fail_if_not_compressed:*/ 0);
if (fd < 0)
bb_simple_perror_msg_and_die(G.image_filename);
theme_file = xfdopen_for_read(fd);
diff --git a/miscutils/man.c b/miscutils/man.c
index 51baceb..f046e24 100644
--- a/miscutils/man.c
+++ b/miscutils/man.c
@@ -102,7 +102,7 @@ static int run_pipe(const char *pager, char *man_filename, int man, int level)
ordinary_manpage:
close(STDIN_FILENO);
- open_zipped(man_filename); /* guaranteed to use fd 0 (STDIN_FILENO) */
+ open_zipped(man_filename, /*fail_if_not_compressed:*/ 0); /* guaranteed to use fd 0 (STDIN_FILENO) */
/* "2>&1" is added so that nroff errors are shown in pager too.
* Otherwise it may show just empty screen */
cmd = xasprintf(