ldlinux: Fix detection of function keys
authorMatt Fleming <matt.fleming@intel.com>
Thu, 1 Mar 2012 11:54:13 +0000 (11:54 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Fri, 23 Mar 2012 16:34:41 +0000 (16:34 +0000)
commit65377fc66c4e0877a9bcc511cdc92b5a05e23822
treed8a2678aa982567e42f1357b2f521a650cf48b2d
parent89513b6392f4d815be8794100d092f8d172d0b30
ldlinux: Fix detection of function keys

__get_key() directly calls getchar() but doesn't properly detect when
a function key such as F1, F2, etc has been entered. Despite the
previous commit to cli.c which read,

    ldlinux: Accept commands from the serial console

    To mimic the old (pre-elflink) command-line interface behaviour let's
    use getchar() instead of reading from stdin. This way, if the user
    types a command on the serial console it will actually be executed.

I can't see how get_key() fails to detect input on the serial
console. So let's revert to calling get_key() because it actually
handles the detection of function keys.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
com32/elflink/ldlinux/cli.c