This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/10339] New: Terminal interface: non-standard baudrates are not handled properly on Linux-systems
- From: "schaefer dot frank at gmx dot net" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 27 Jun 2009 17:48:41 -0000
- Subject: [Bug libc/10339] New: Terminal interface: non-standard baudrates are not handled properly on Linux-systems
- Reply-to: sourceware-bugzilla at sourceware dot org
On Linux-systems, the baud constant BOTHER is defined/used to handle
non-standard baudrates:
if the baudrate in field c_cflag of the termios-structure is set to BOTHER, the
fields c_ispeed/c_ospeed are interpreted as the baud rate value directly.
I've sent a message to the help-mailing-list and Carlos O'Donell confirmed that
BOTHER is currently not supported. He suggested to file this bug-report.
I talked to Alan Cox, who answered me:
> ... needs to talk to Roland McGrath who helped *design* the termios2
> interface *three* years ago. We added it to mainstream in December 2006,
> after discussion with members of the glibc and kernel teams throughout
> about 6 months before including Roland coming up with the CBAUDEX|0
> encoding idea.
> ...
> If present the "2" versions of the termios ioctls return a struct termios2
> which contains c_ispeed/c_ospeed and match the glibc view of having
> separate speed fields. Some platforms already had these fields so do not
> have new ioctls for them
>
> Basically
>
> #ifdef BOTHER
> /* We have arbitary baud rate */
> /* c_ispeed/c_ospeed honoured on set if BOTHER is the speed, returned
> on get calls in all cases */
> #endif
>
> #ifdef TCGETS2
> /* We have the extended termios2 ioctls */
> #else
> /* (eg Alpha) We already returned c_ispeed/c_ospeed and now return
> arbitary values in them */
> #endif
>
> When the changes were done the stty/gtty compat calls were also improved
> to report correct values not that most apps/libraries ever used them.
> ...
--
Summary: Terminal interface: non-standard baudrates are not
handled properly on Linux-systems
Product: glibc
Version: 2.9
Status: NEW
Severity: normal
Priority: P2
Component: libc
AssignedTo: drepper at redhat dot com
ReportedBy: schaefer dot frank at gmx dot net
CC: glibc-bugs at sources dot redhat dot com,roland at gnu
dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=10339
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.