From: Russell King <rmk@arm.linux.org.uk>
To: Alexander Viro <viro@math.psu.edu>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: [initramfs] wait_for_keypress() and ->wait_key()
Date: Fri, 13 Jul 2001 11:45:45 +0100 [thread overview]
Message-ID: <20010713114545.C970@flint.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.GSO.4.21.0107121851430.15756-100000@weyl.math.psu.edu>
In-Reply-To: <Pine.GSO.4.21.0107121851430.15756-100000@weyl.math.psu.edu>; from viro@math.psu.edu on Thu, Jul 12, 2001 at 08:00:27PM -0400
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
prev parent reply other threads:[~2001-07-13 10:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-13 0:00 [initramfs] wait_for_keypress() and ->wait_key() Alexander Viro
2001-07-13 10:45 ` Russell King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010713114545.C970@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox