diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2013-02-28 18:04:22 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-02-28 18:05:01 +0100 |
commit | f2d8478e560fd77b45dbea7993d6219a5b635b2e (patch) | |
tree | 8c0d3717cd31dec3eef2c478fd70f049ade5ec86 | |
parent | 577235dee826eed86d76b0d4ef866297a20ecd55 (diff) | |
download | busybox-w32-f2d8478e560fd77b45dbea7993d6219a5b635b2e.tar.gz busybox-w32-f2d8478e560fd77b45dbea7993d6219a5b635b2e.tar.bz2 busybox-w32-f2d8478e560fd77b45dbea7993d6219a5b635b2e.zip |
fix error message on failure to oen /dev/null; fix zcat's help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | archival/bbunzip.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c index 94d8a81c9..46f99cf78 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c | |||
@@ -68,7 +68,7 @@ int FAST_FUNC bbunpack(char **argv, | |||
68 | if (option_mask32 & (OPT_STDOUT|OPT_TEST)) { | 68 | if (option_mask32 & (OPT_STDOUT|OPT_TEST)) { |
69 | if (option_mask32 & OPT_TEST) | 69 | if (option_mask32 & OPT_TEST) |
70 | if (open_to_or_warn(STDOUT_FILENO, bb_dev_null, O_WRONLY, 0)) | 70 | if (open_to_or_warn(STDOUT_FILENO, bb_dev_null, O_WRONLY, 0)) |
71 | goto err; | 71 | xfunc_die(); |
72 | filename = NULL; | 72 | filename = NULL; |
73 | } | 73 | } |
74 | 74 | ||
@@ -93,7 +93,7 @@ int FAST_FUNC bbunpack(char **argv, | |||
93 | } | 93 | } |
94 | 94 | ||
95 | /* Check that the input is sane */ | 95 | /* Check that the input is sane */ |
96 | if (isatty(STDIN_FILENO) && (option_mask32 & OPT_FORCE) == 0) { | 96 | if (!(option_mask32 & OPT_FORCE) && isatty(STDIN_FILENO)) { |
97 | bb_error_msg_and_die("compressed data not read from terminal, " | 97 | bb_error_msg_and_die("compressed data not read from terminal, " |
98 | "use -f to force it"); | 98 | "use -f to force it"); |
99 | } | 99 | } |
@@ -241,7 +241,7 @@ int uncompress_main(int argc UNUSED_PARAM, char **argv) | |||
241 | //usage: "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n" | 241 | //usage: "-rw-rw-r-- 1 andersen andersen 1761280 Apr 14 17:47 /tmp/BusyBox-0.43.tar\n" |
242 | //usage: | 242 | //usage: |
243 | //usage:#define zcat_trivial_usage | 243 | //usage:#define zcat_trivial_usage |
244 | //usage: "FILE" | 244 | //usage: "[FILE]..." |
245 | //usage:#define zcat_full_usage "\n\n" | 245 | //usage:#define zcat_full_usage "\n\n" |
246 | //usage: "Decompress to stdout" | 246 | //usage: "Decompress to stdout" |
247 | 247 | ||
@@ -316,7 +316,7 @@ int gunzip_main(int argc UNUSED_PARAM, char **argv) | |||
316 | //usage: "\n -c Write to stdout" | 316 | //usage: "\n -c Write to stdout" |
317 | //usage: "\n -f Force" | 317 | //usage: "\n -f Force" |
318 | //usage:#define bzcat_trivial_usage | 318 | //usage:#define bzcat_trivial_usage |
319 | //usage: "FILE" | 319 | //usage: "[FILE]..." |
320 | //usage:#define bzcat_full_usage "\n\n" | 320 | //usage:#define bzcat_full_usage "\n\n" |
321 | //usage: "Decompress to stdout" | 321 | //usage: "Decompress to stdout" |
322 | //applet:IF_BUNZIP2(APPLET(bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP)) | 322 | //applet:IF_BUNZIP2(APPLET(bunzip2, BB_DIR_USR_BIN, BB_SUID_DROP)) |
@@ -365,7 +365,7 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv) | |||
365 | //usage: "\n -f Force" | 365 | //usage: "\n -f Force" |
366 | //usage: | 366 | //usage: |
367 | //usage:#define lzcat_trivial_usage | 367 | //usage:#define lzcat_trivial_usage |
368 | //usage: "FILE" | 368 | //usage: "[FILE]..." |
369 | //usage:#define lzcat_full_usage "\n\n" | 369 | //usage:#define lzcat_full_usage "\n\n" |
370 | //usage: "Decompress to stdout" | 370 | //usage: "Decompress to stdout" |
371 | //usage: | 371 | //usage: |
@@ -385,7 +385,7 @@ int bunzip2_main(int argc UNUSED_PARAM, char **argv) | |||
385 | //usage: "\n -f Force" | 385 | //usage: "\n -f Force" |
386 | //usage: | 386 | //usage: |
387 | //usage:#define xzcat_trivial_usage | 387 | //usage:#define xzcat_trivial_usage |
388 | //usage: "FILE" | 388 | //usage: "[FILE]..." |
389 | //usage:#define xzcat_full_usage "\n\n" | 389 | //usage:#define xzcat_full_usage "\n\n" |
390 | //usage: "Decompress to stdout" | 390 | //usage: "Decompress to stdout" |
391 | 391 | ||