diff options
author | Matt Fleming <matt.fleming@intel.com> | 2013-07-01 10:28:15 +0100 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-07-01 10:28:15 +0100 |
commit | 61291b1e3ec0687f464a4c5b1ff17a1f944d52a0 (patch) | |
tree | 07467669e223668a07be7e2404de273311ccedf6 | |
parent | 00d0f3add99de6d9c83ff2492bac175a5e1b8a11 (diff) | |
download | syslinux-61291b1e3ec0687f464a4c5b1ff17a1f944d52a0.tar.gz |
conio: Fix pollchar() for serial consolesyslinux-5.11-pre4
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@intel.com>
-rw-r--r-- | core/conio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/conio.c b/core/conio.c index 3b8a103b..3d594853 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(); |