aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-07-17 14:54:31 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-07-17 14:54:31 -0700
commite21e687111c7dcb234690de6c4175b4e69161cfd (patch)
tree6d1694e771b180c2a32631a0f8b30fbbfe6a573d /core
parent6a9f2f38895d2c93b531772d34f7b031417c73f7 (diff)
downloadsyslinux-elf-e21e687111c7dcb234690de6c4175b4e69161cfd.tar.gz
syslinux-elf-e21e687111c7dcb234690de6c4175b4e69161cfd.tar.xz
syslinux-elf-e21e687111c7dcb234690de6c4175b4e69161cfd.zip
Correctly parse "serial" statements with no baud rate
People often don't bother specifying a baud rate for virtual serial ports. Handle parsing correctly.
Diffstat (limited to 'core')
-rw-r--r--core/parseconfig.inc13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/parseconfig.inc b/core/parseconfig.inc
index 2975a8b3..7fb6ddf9 100644
--- a/core/parseconfig.inc
+++ b/core/parseconfig.inc
@@ -183,14 +183,13 @@ pc_include: inc word [IncludeLevel]
pc_serial: call getint
jc .err
push bx ; Serial port #
+ xor ax,ax
+ mov [FlowControl],ax ; Default to no flow control
+ mov [FlowIgnore],al
call skipspace
- jnc .ok
- pop bx
-.err: ret
-.ok:
+ jc .nobaud
call ungetc
call getint
- mov [FlowControl], word 0 ; Default to no flow control
jc .nobaud
.valid_baud:
push ebx
@@ -250,7 +249,7 @@ pc_serial: call getint
in al,dx ; Read back LCR (detect missing hw)
cmp al,03h ; If nothing here we'll read 00 or FF
- jne .serial_port_bad ; Assume serial port busted
+ jne .err ; Assume serial port busted
dec dx
dec dx ; DX -> IER
xor al,al ; IRQ disable
@@ -284,7 +283,7 @@ pc_serial: call getint
.notfirst:
ret
-.serial_port_bad:
+.err:
mov [SerialPort], word 0
ret