Incomplete baud rate mapping in termiostty.c

Rainer Arndt Arndt-ADT@kieback-peter.de
Wed Jan 30 16:59:00 GMT 2008


The ecosbaud2posixbaud table in termiostty.c is incomplete. The baud
rate entry B1800 is missing.
I have attached a fix.

real_termios_init() is called from termios_lookup() only if the init
flag was not set before. 
I could't found where the flag is set. I think it is missing in
real_termios_init?

Because of the flag isn't set, real_termios_init() is called every time
the device is opened and requests the current device baudrate from the
ecos device.
But the value returned from map_ecosbaud_to_posixbaud() could be wrong
because of the missing B1800 entry.

One consequence is that setting a new baud rate could fail after reopen
a device (e.g. current 19200 -> new 38400), because in set_attr () the
new baud rate is only set if it is different from the current one.
nice bug ;-)

Rainer
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: termiostty.c.patch
URL: <http://sourceware.org/pipermail/ecos-patches/attachments/20080130/33b6e87a/attachment.ksh>


More information about the Ecos-patches mailing list