Skip to contentSkip to conversation

struct termios/termios2 rationale and usage

DISCUSSION Tilman Schmidt 1 participant 1 message Mar 27, 2008 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

I'm currently trying to conceive of a way to portably use the "new" (relatively) way of setting serial line bit rates via BOTHER and c_ispeed/c_ospeed from a userspace utility. (ldattach(1), to be included in the next release of util_linux_ng, in case you're interested.) I notice that most architectures have introduced new ioctls (TCGETS2 etc.) and struct termios2 for that, while some (eg. powerpc) have integrated the c_ispeed/c_ospeed fields in struct termios and supposedly get/set them via the old "non-2" ioctls.

What's the rationale behind this? What is the recommended usage for a Linux userspace program wanting to use the BOTHER speed setting mechanism on a variety of architectures?

Thanks,
Tilman

Signature · 4 lines
Tilman Schmidt                    E-Mail: [email protected]
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)