Problem was observed on a Xilinx Microblaze system with console on mdm IP (which is very slow), where part of the console output wasn't shown.
Calling tcdrain() instead of tcflush() fixes the problem. Signed-off-by: Peter Korsgaard <[email protected]> Signed-off-by: Michal Simek <[email protected]> --- loginutils/getty.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/loginutils/getty.c b/loginutils/getty.c index 0f5e333..79c278f 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -266,8 +266,8 @@ static void termios_init(struct termios *tp, int speed) * reads will be done in raw mode anyway. Errors will be dealt with * later on. */ - /* flush input and output queues, important for modems! */ - tcflush(0, TCIOFLUSH); + /* wait until all output written to the stdout has been transmitted */ + tcdrain(STDOUT_FILENO); ispeed = ospeed = speed; if (speed == B0) { /* Speed was specified as "0" on command line. -- 1.5.5.6 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
