diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-07 02:21:34 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-07 02:21:34 +0200 |
commit | 4dea1edd08a45c5987448719e56ee61a20fb9210 (patch) | |
tree | e37547a45245a8caa0c1b471131ca69d3e4b4637 /util-linux/script.c | |
parent | 269b36a49a60a90ce59dd6209728ec97fd72077e (diff) | |
download | busybox-w32-4dea1edd08a45c5987448719e56ee61a20fb9210.tar.gz busybox-w32-4dea1edd08a45c5987448719e56ee61a20fb9210.tar.bz2 busybox-w32-4dea1edd08a45c5987448719e56ee61a20fb9210.zip |
script: -f means "flush", not "fsync"
function old new delta
packed_usage 31765 31768 +3
script_main 1102 1082 -20
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/script.c')
-rw-r--r-- | util-linux/script.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/util-linux/script.c b/util-linux/script.c index 62a241762..89b439163 100644 --- a/util-linux/script.c +++ b/util-linux/script.c | |||
@@ -27,7 +27,8 @@ | |||
27 | //usage: "\n" | 27 | //usage: "\n" |
28 | //usage: "\n -a Append output" | 28 | //usage: "\n -a Append output" |
29 | //usage: "\n -c PROG Run PROG, not shell" | 29 | //usage: "\n -c PROG Run PROG, not shell" |
30 | //usage: "\n -f Flush output after each write" | 30 | /* Accepted but has no effect (we never buffer output) */ |
31 | /*//usage: "\n -f Flush output after each write"*/ | ||
31 | //usage: "\n -q Quiet" | 32 | //usage: "\n -q Quiet" |
32 | //usage: "\n -t[FILE] Send timing to stderr or FILE" | 33 | //usage: "\n -t[FILE] Send timing to stderr or FILE" |
33 | 34 | ||
@@ -178,9 +179,10 @@ int script_main(int argc UNUSED_PARAM, char **argv) | |||
178 | } | 179 | } |
179 | full_write(STDOUT_FILENO, buf, count); | 180 | full_write(STDOUT_FILENO, buf, count); |
180 | full_write(outfd, buf, count); | 181 | full_write(outfd, buf, count); |
181 | if (opt & OPT_f) { | 182 | // If we'd be using (buffered) FILE i/o, we'd need this: |
182 | fsync(outfd); | 183 | //if (opt & OPT_f) { |
183 | } | 184 | // fflush(outfd); |
185 | //} | ||
184 | } | 186 | } |
185 | } | 187 | } |
186 | if (pfd[1].revents) { | 188 | if (pfd[1].revents) { |