getty: flush _only_ input after switching to the next baud rate
authorDenys Vlasenko <vda.linux@googlemail.com>
Mon, 24 Jan 2011 22:45:22 +0000 (23:45 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 24 Jan 2011 22:45:22 +0000 (23:45 +0100)
It was originally like this, but at some point TCIFLUSH was
inadvertently changed to TCIOFLUSH.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
loginutils/getty.c

index ed7e09acab122c643dfb8ff7310bc12978d34ab8..becff5c78d4417294d16e72e9dc48c16158853c5 100644 (file)
@@ -375,7 +375,7 @@ static char *get_logname(void)
 
        /* Flush pending input (esp. after parsing or switching the baud rate) */
        usleep(100*1000); /* 0.1 sec */
-       tcflush(STDIN_FILENO, TCIOFLUSH);
+       tcflush(STDIN_FILENO, TCIFLUSH);
 
        /* Prompt for and read a login name */
        G.line_buf[0] = '\0';