[syslinux:elflink] conio: Fix pollchar() for serial console
syslinux-bot for Matt Fleming
matt.fleming at intel.com
Mon Jul 1 02:36:07 PDT 2013
Commit-ID: 61291b1e3ec0687f464a4c5b1ff17a1f944d52a0
Gitweb: http://www.syslinux.org/commit/61291b1e3ec0687f464a4c5b1ff17a1f944d52a0
Author: Matt Fleming <matt.fleming at intel.com>
AuthorDate: Mon, 1 Jul 2013 10:28:15 +0100
Committer: Matt Fleming <matt.fleming at intel.com>
CommitDate: Mon, 1 Jul 2013 10:28:15 +0100
conio: Fix pollchar() for serial console
The check of the LSR value was inverted. This resulted in pollchar()
always claiming that there was data to be read from the serial console.
Signed-off-by: Matt Fleming <matt.fleming at intel.com>
---
core/conio.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/core/conio.c b/core/conio.c
index 3b8a103..3d59485 100644
--- a/core/conio.c
+++ b/core/conio.c
@@ -161,8 +161,8 @@ __export int pollchar(void)
/* Already-queued input? */
if (SerialTail == SerialHead) {
/* LSR */
- data = !(inb(SerialPort + 5) & 1);
- if (!data) {
+ data = inb(SerialPort + 5) & 1;
+ if (data) {
/* MSR */
data = inb(SerialPort + 6);
@@ -173,8 +173,7 @@ __export int pollchar(void)
data = 1;
else
data = 0;
- } else
- data = 1;
+ }
} else
data = 1;
sti();
More information about the Syslinux-commits
mailing list