diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-02 14:19:51 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-11-02 14:19:51 +0100 |
commit | 8131eea3dce5fba0dfb78e6083d1730423fad20b (patch) | |
tree | c098d7ba6ef9f4745425a29a330480e6088d6d9a /coreutils | |
parent | 0d8ea64af618dc83c3291b3b598636ed3d0854e4 (diff) | |
download | busybox-w32-8131eea3dce5fba0dfb78e6083d1730423fad20b.tar.gz busybox-w32-8131eea3dce5fba0dfb78e6083d1730423fad20b.tar.bz2 busybox-w32-8131eea3dce5fba0dfb78e6083d1730423fad20b.zip |
*: introduce and use ffulsh_all()
function old new delta
buffer_fill_and_print 179 196 +17
fflush_all - 9 +9
spawn 87 92 +5
rtcwake_main 455 453 -2
...
alarm_intr 93 84 -9
readcmd 1072 1062 -10
bb_ask 345 333 -12
more_main 845 832 -13
flush_stdout_stderr 42 23 -19
xfflush_stdout 27 - -27
flush_stderr 30 - -30
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397) Total: -366 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/dd.c | 2 | ||||
-rw-r--r-- | coreutils/dirname.c | 2 | ||||
-rw-r--r-- | coreutils/echo.c | 2 | ||||
-rw-r--r-- | coreutils/hostid.c | 2 | ||||
-rw-r--r-- | coreutils/length.c | 2 | ||||
-rw-r--r-- | coreutils/logname.c | 2 | ||||
-rw-r--r-- | coreutils/pwd.c | 2 | ||||
-rw-r--r-- | coreutils/seq.c | 2 | ||||
-rw-r--r-- | coreutils/whoami.c | 2 |
9 files changed, 9 insertions, 9 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c index 8bba62ce1..f1e63fd8b 100644 --- a/coreutils/dd.c +++ b/coreutils/dd.c | |||
@@ -189,7 +189,7 @@ int dd_main(int argc UNUSED_PARAM, char **argv) | |||
189 | 189 | ||
190 | memset(&Z, 0, sizeof(Z)); | 190 | memset(&Z, 0, sizeof(Z)); |
191 | INIT_G(); | 191 | INIT_G(); |
192 | //fflush(NULL); - is this needed because of NOEXEC? | 192 | //fflush_all(); - is this needed because of NOEXEC? |
193 | 193 | ||
194 | for (n = 1; argv[n]; n++) { | 194 | for (n = 1; argv[n]; n++) { |
195 | int what; | 195 | int what; |
diff --git a/coreutils/dirname.c b/coreutils/dirname.c index c0c0925e5..1f5f70dfd 100644 --- a/coreutils/dirname.c +++ b/coreutils/dirname.c | |||
@@ -23,5 +23,5 @@ int dirname_main(int argc, char **argv) | |||
23 | 23 | ||
24 | puts(dirname(argv[1])); | 24 | puts(dirname(argv[1])); |
25 | 25 | ||
26 | return fflush(stdout); | 26 | return fflush_all(); |
27 | } | 27 | } |
diff --git a/coreutils/echo.c b/coreutils/echo.c index decca095f..69039969b 100644 --- a/coreutils/echo.c +++ b/coreutils/echo.c | |||
@@ -141,7 +141,7 @@ int echo_main(int argc UNUSED_PARAM, char **argv) | |||
141 | bb_putchar('\n'); | 141 | bb_putchar('\n'); |
142 | } | 142 | } |
143 | ret: | 143 | ret: |
144 | return fflush(stdout); | 144 | return fflush_all(); |
145 | } | 145 | } |
146 | 146 | ||
147 | /*- | 147 | /*- |
diff --git a/coreutils/hostid.c b/coreutils/hostid.c index 2794510a7..6f007d847 100644 --- a/coreutils/hostid.c +++ b/coreutils/hostid.c | |||
@@ -22,5 +22,5 @@ int hostid_main(int argc, char **argv UNUSED_PARAM) | |||
22 | 22 | ||
23 | printf("%lx\n", gethostid()); | 23 | printf("%lx\n", gethostid()); |
24 | 24 | ||
25 | return fflush(stdout); | 25 | return fflush_all(); |
26 | } | 26 | } |
diff --git a/coreutils/length.c b/coreutils/length.c index 43a0f5988..015b2216f 100644 --- a/coreutils/length.c +++ b/coreutils/length.c | |||
@@ -18,5 +18,5 @@ int length_main(int argc, char **argv) | |||
18 | 18 | ||
19 | printf("%u\n", (unsigned)strlen(*argv)); | 19 | printf("%u\n", (unsigned)strlen(*argv)); |
20 | 20 | ||
21 | return fflush(stdout); | 21 | return fflush_all(); |
22 | } | 22 | } |
diff --git a/coreutils/logname.c b/coreutils/logname.c index 7983d1704..7e5013255 100644 --- a/coreutils/logname.c +++ b/coreutils/logname.c | |||
@@ -36,7 +36,7 @@ int logname_main(int argc, char **argv UNUSED_PARAM) | |||
36 | /* Using _r function - avoid pulling in static buffer from libc */ | 36 | /* Using _r function - avoid pulling in static buffer from libc */ |
37 | if (getlogin_r(buf, sizeof(buf)) == 0) { | 37 | if (getlogin_r(buf, sizeof(buf)) == 0) { |
38 | puts(buf); | 38 | puts(buf); |
39 | return fflush(stdout); | 39 | return fflush_all(); |
40 | } | 40 | } |
41 | 41 | ||
42 | bb_perror_msg_and_die("getlogin"); | 42 | bb_perror_msg_and_die("getlogin"); |
diff --git a/coreutils/pwd.c b/coreutils/pwd.c index 57953d246..11278a2a5 100644 --- a/coreutils/pwd.c +++ b/coreutils/pwd.c | |||
@@ -20,7 +20,7 @@ int pwd_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
20 | if (buf != NULL) { | 20 | if (buf != NULL) { |
21 | puts(buf); | 21 | puts(buf); |
22 | free(buf); | 22 | free(buf); |
23 | return fflush(stdout); | 23 | return fflush_all(); |
24 | } | 24 | } |
25 | 25 | ||
26 | return EXIT_FAILURE; | 26 | return EXIT_FAILURE; |
diff --git a/coreutils/seq.c b/coreutils/seq.c index 03ae3c632..84d11fd8c 100644 --- a/coreutils/seq.c +++ b/coreutils/seq.c | |||
@@ -95,5 +95,5 @@ int seq_main(int argc, char **argv) | |||
95 | if (n) /* if while loop executed at least once */ | 95 | if (n) /* if while loop executed at least once */ |
96 | bb_putchar('\n'); | 96 | bb_putchar('\n'); |
97 | 97 | ||
98 | return fflush(stdout); | 98 | return fflush_all(); |
99 | } | 99 | } |
diff --git a/coreutils/whoami.c b/coreutils/whoami.c index 0dbcba955..1031cdbf8 100644 --- a/coreutils/whoami.c +++ b/coreutils/whoami.c | |||
@@ -22,5 +22,5 @@ int whoami_main(int argc, char **argv UNUSED_PARAM) | |||
22 | /* Will complain and die if username not found */ | 22 | /* Will complain and die if username not found */ |
23 | puts(xuid2uname(geteuid())); | 23 | puts(xuid2uname(geteuid())); |
24 | 24 | ||
25 | return fflush(stdout); | 25 | return fflush_all(); |
26 | } | 26 | } |