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 /util-linux | |
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 'util-linux')
-rw-r--r-- | util-linux/fsck_minix.c | 2 | ||||
-rw-r--r-- | util-linux/mkfs_minix.c | 2 | ||||
-rw-r--r-- | util-linux/more.c | 4 | ||||
-rw-r--r-- | util-linux/rtcwake.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index cdd306031..cc9eec22d 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -341,7 +341,7 @@ static int ask(const char *string, int def) | |||
341 | } | 341 | } |
342 | printf(def ? "%s (y/n)? " : "%s (n/y)? ", string); | 342 | printf(def ? "%s (y/n)? " : "%s (n/y)? ", string); |
343 | for (;;) { | 343 | for (;;) { |
344 | fflush(NULL); | 344 | fflush_all(); |
345 | c = getchar(); | 345 | c = getchar(); |
346 | if (c == EOF) { | 346 | if (c == EOF) { |
347 | if (!def) | 347 | if (!def) |
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c index cf757610b..8819cee4e 100644 --- a/util-linux/mkfs_minix.c +++ b/util-linux/mkfs_minix.c | |||
@@ -505,7 +505,7 @@ static void alarm_intr(int alnum UNUSED_PARAM) | |||
505 | if (!G.currently_testing) | 505 | if (!G.currently_testing) |
506 | return; | 506 | return; |
507 | printf("%d ...", G.currently_testing); | 507 | printf("%d ...", G.currently_testing); |
508 | fflush(stdout); | 508 | fflush_all(); |
509 | } | 509 | } |
510 | 510 | ||
511 | static void check_blocks(void) | 511 | static void check_blocks(void) |
diff --git a/util-linux/more.c b/util-linux/more.c index 9ac4dd8e3..555f033d4 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
@@ -114,7 +114,7 @@ int more_main(int argc UNUSED_PARAM, char **argv) | |||
114 | (int) (ftello(file)*100 / st.st_size), | 114 | (int) (ftello(file)*100 / st.st_size), |
115 | st.st_size); | 115 | st.st_size); |
116 | } | 116 | } |
117 | fflush(stdout); | 117 | fflush_all(); |
118 | 118 | ||
119 | /* | 119 | /* |
120 | * We've just displayed the "--More--" prompt, so now we need | 120 | * We've just displayed the "--More--" prompt, so now we need |
@@ -189,7 +189,7 @@ int more_main(int argc UNUSED_PARAM, char **argv) | |||
189 | putchar(c); | 189 | putchar(c); |
190 | } | 190 | } |
191 | fclose(file); | 191 | fclose(file); |
192 | fflush(stdout); | 192 | fflush_all(); |
193 | } while (*argv && *++argv); | 193 | } while (*argv && *++argv); |
194 | end: | 194 | end: |
195 | setTermSettings(cin_fileno, &initial_settings); | 195 | setTermSettings(cin_fileno, &initial_settings); |
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c index f90f73ced..049f699f5 100644 --- a/util-linux/rtcwake.c +++ b/util-linux/rtcwake.c | |||
@@ -172,7 +172,7 @@ int rtcwake_main(int argc UNUSED_PARAM, char **argv) | |||
172 | 172 | ||
173 | sync(); | 173 | sync(); |
174 | printf("wakeup from \"%s\" at %s", suspend, ctime(&alarm_time)); | 174 | printf("wakeup from \"%s\" at %s", suspend, ctime(&alarm_time)); |
175 | fflush(NULL); | 175 | fflush_all(); |
176 | usleep(10 * 1000); | 176 | usleep(10 * 1000); |
177 | 177 | ||
178 | if (strcmp(suspend, "on")) | 178 | if (strcmp(suspend, "on")) |