summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorDave Frodin <dave.frodin@se-eng.com>2012-11-27 16:02:41 -0700
committerMarc Jones <marcj303@gmail.com>2012-12-07 20:41:46 +0100
commit0a90861ff2308cf03928dbe5b7c4d3dfde82ceb4 (patch)
treeb38fdbfd3331bb4b9f31a98d0b2cd67cf5af56b9 /payloads/libpayload
parent67ce04ea9a9c7e30dd96b9f36a938b51655e8a44 (diff)
libpayload: Don't let USB/PC/serial keyboards overwrite each other
Change-Id: I75c0066cf737e0cecac056487215622e2b3d4467 Signed-off-by: Dave Frodin <dave.frodin@se-eng.com> Reviewed-on: http://review.coreboot.org/1981 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/curses/pdcurses-backend/pdckbd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/payloads/libpayload/curses/pdcurses-backend/pdckbd.c b/payloads/libpayload/curses/pdcurses-backend/pdckbd.c
index 4558406ea3..49b80c74fc 100644
--- a/payloads/libpayload/curses/pdcurses-backend/pdckbd.c
+++ b/payloads/libpayload/curses/pdcurses-backend/pdckbd.c
@@ -149,14 +149,14 @@ int PDC_get_key(void)
#ifdef CONFIG_PC_KEYBOARD
if ((curses_flags & F_ENABLE_CONSOLE) &&
- keyboard_havechar()) {
+ keyboard_havechar() && (c==0)) {
c = keyboard_getchar();
}
#endif
#ifdef CONFIG_SERIAL_CONSOLE
if ((curses_flags & F_ENABLE_SERIAL) &&
- serial_havechar()) {
+ serial_havechar() && (c==0)) {
c = cook_serial(serial_getchar());
}
#endif