summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko2009-11-02 14:19:51 +0100
committerDenys Vlasenko2009-11-02 14:19:51 +0100
commit8131eea3dce5fba0dfb78e6083d1730423fad20b (patch)
treec098d7ba6ef9f4745425a29a330480e6088d6d9a /coreutils
parent0d8ea64af618dc83c3291b3b598636ed3d0854e4 (diff)
downloadbusybox-8131eea3dce5fba0dfb78e6083d1730423fad20b.zip
busybox-8131eea3dce5fba0dfb78e6083d1730423fad20b.tar.gz
*: 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.c2
-rw-r--r--coreutils/dirname.c2
-rw-r--r--coreutils/echo.c2
-rw-r--r--coreutils/hostid.c2
-rw-r--r--coreutils/length.c2
-rw-r--r--coreutils/logname.c2
-rw-r--r--coreutils/pwd.c2
-rw-r--r--coreutils/seq.c2
-rw-r--r--coreutils/whoami.c2
9 files changed, 9 insertions, 9 deletions
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 8bba62c..f1e63fd 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -189,7 +189,7 @@ int dd_main(int argc UNUSED_PARAM, char **argv)
memset(&Z, 0, sizeof(Z));
INIT_G();
- //fflush(NULL); - is this needed because of NOEXEC?
+ //fflush_all(); - is this needed because of NOEXEC?
for (n = 1; argv[n]; n++) {
int what;
diff --git a/coreutils/dirname.c b/coreutils/dirname.c
index c0c0925..1f5f70d 100644
--- a/coreutils/dirname.c
+++ b/coreutils/dirname.c
@@ -23,5 +23,5 @@ int dirname_main(int argc, char **argv)
puts(dirname(argv[1]));
- return fflush(stdout);
+ return fflush_all();
}
diff --git a/coreutils/echo.c b/coreutils/echo.c
index decca09..6903996 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -141,7 +141,7 @@ int echo_main(int argc UNUSED_PARAM, char **argv)
bb_putchar('\n');
}
ret:
- return fflush(stdout);
+ return fflush_all();
}
/*-
diff --git a/coreutils/hostid.c b/coreutils/hostid.c
index 2794510..6f007d8 100644
--- a/coreutils/hostid.c
+++ b/coreutils/hostid.c
@@ -22,5 +22,5 @@ int hostid_main(int argc, char **argv UNUSED_PARAM)
printf("%lx\n", gethostid());
- return fflush(stdout);
+ return fflush_all();
}
diff --git a/coreutils/length.c b/coreutils/length.c
index 43a0f59..015b221 100644
--- a/coreutils/length.c
+++ b/coreutils/length.c
@@ -18,5 +18,5 @@ int length_main(int argc, char **argv)
printf("%u\n", (unsigned)strlen(*argv));
- return fflush(stdout);
+ return fflush_all();
}
diff --git a/coreutils/logname.c b/coreutils/logname.c
index 7983d17..7e50132 100644
--- a/coreutils/logname.c
+++ b/coreutils/logname.c
@@ -36,7 +36,7 @@ int logname_main(int argc, char **argv UNUSED_PARAM)
/* Using _r function - avoid pulling in static buffer from libc */
if (getlogin_r(buf, sizeof(buf)) == 0) {
puts(buf);
- return fflush(stdout);
+ return fflush_all();
}
bb_perror_msg_and_die("getlogin");
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index 57953d2..11278a2 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -20,7 +20,7 @@ int pwd_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
if (buf != NULL) {
puts(buf);
free(buf);
- return fflush(stdout);
+ return fflush_all();
}
return EXIT_FAILURE;
diff --git a/coreutils/seq.c b/coreutils/seq.c
index 03ae3c6..84d11fd 100644
--- a/coreutils/seq.c
+++ b/coreutils/seq.c
@@ -95,5 +95,5 @@ int seq_main(int argc, char **argv)
if (n) /* if while loop executed at least once */
bb_putchar('\n');
- return fflush(stdout);
+ return fflush_all();
}
diff --git a/coreutils/whoami.c b/coreutils/whoami.c
index 0dbcba9..1031cdb 100644
--- a/coreutils/whoami.c
+++ b/coreutils/whoami.c
@@ -22,5 +22,5 @@ int whoami_main(int argc, char **argv UNUSED_PARAM)
/* Will complain and die if username not found */
puts(xuid2uname(geteuid()));
- return fflush(stdout);
+ return fflush_all();
}