diff options
author | Ron Yorston <rmy@pobox.com> | 2012-03-23 11:13:23 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-03-23 11:13:23 +0000 |
commit | 40514a0309939f2446f0d4ed9600cad5de396e7f (patch) | |
tree | 0f5f4a57d4bb7893418b5bb11d482858eb17ba8b /archival/bbunzip.c | |
parent | 9db164d6e39050d09f38288c6045cd2a2cbf6d63 (diff) | |
parent | c0cae52662ccced9df19f19ec94238d1b1e3bd71 (diff) | |
download | busybox-w32-40514a0309939f2446f0d4ed9600cad5de396e7f.tar.gz busybox-w32-40514a0309939f2446f0d4ed9600cad5de396e7f.tar.bz2 busybox-w32-40514a0309939f2446f0d4ed9600cad5de396e7f.zip |
Merge commit 'c0cae52662ccced9df19f19ec94238d1b1e3bd71' into merge
Conflicts:
Makefile.flags
scripts/basic/fixdep.c
Diffstat (limited to 'archival/bbunzip.c')
-rw-r--r-- | archival/bbunzip.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/archival/bbunzip.c b/archival/bbunzip.c index 0b0d84994..c96e5396a 100644 --- a/archival/bbunzip.c +++ b/archival/bbunzip.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. | 5 | * Licensed under GPLv2 or later, see file LICENSE in this source tree. |
6 | */ | 6 | */ |
7 | #include "libbb.h" | 7 | #include "libbb.h" |
8 | #include "archive.h" | 8 | #include "bb_archive.h" |
9 | 9 | ||
10 | enum { | 10 | enum { |
11 | OPT_STDOUT = 1 << 0, | 11 | OPT_STDOUT = 1 << 0, |
@@ -103,7 +103,9 @@ int FAST_FUNC bbunpack(char **argv, | |||
103 | status = unpacker(&info); | 103 | status = unpacker(&info); |
104 | if (status < 0) | 104 | if (status < 0) |
105 | exitcode = 1; | 105 | exitcode = 1; |
106 | xclose(STDOUT_FILENO); /* with error check! */ | 106 | |
107 | if (!(option_mask32 & OPT_STDOUT)) | ||
108 | xclose(STDOUT_FILENO); /* with error check! */ | ||
107 | 109 | ||
108 | if (filename) { | 110 | if (filename) { |
109 | char *del = new_name; | 111 | char *del = new_name; |
@@ -145,6 +147,9 @@ int FAST_FUNC bbunpack(char **argv, | |||
145 | } | 147 | } |
146 | } while (*argv && *++argv); | 148 | } while (*argv && *++argv); |
147 | 149 | ||
150 | if (option_mask32 & OPT_STDOUT) | ||
151 | xclose(STDOUT_FILENO); /* with error check! */ | ||
152 | |||
148 | return exitcode; | 153 | return exitcode; |
149 | } | 154 | } |
150 | 155 | ||