lkml.org 
[lkml]   [2001]   [Jul]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [initramfs] wait_for_keypress() and ->wait_key()
On Thu, Jul 12, 2001 at 08:00:27PM -0400, Alexander Viro wrote:
> ... On some of them (e.g. serial console) it actually
> eats the character it had receieved.
> ...
> Better yet, attach a VT220 to serial console and press any key that
> would send multiple characters. Yup, that will eat one of them. Have fun
> if you call wait_for_keypress() more than once. (On a normal keyboard
> the effect will differ - next call will block).

We could get round this easily by draining the serial port of charactesr
on entry to the wait_key method. This would mean that the user would
have to press the key after the message has been displayed, which I don't
think is unreasonable, and probably reflects the keyboard behaviour more
accurately.

Note that as long as the device (whether it be VT or serial port) isn't
actually open, the characters pressed will be discarded in both the serial
port and keyboard case, so its not like you're storing up trouble later on.
Currently that is the case.

--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:57    [W:1.146 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site