On Fri, 2007-06-08 at 12:48 +0100, Alan Cox wrote: > > It works fine. The only problem is that if I set a _standard_ baud rate > > with BOTHER and then read it back with something that doesn't grok > > BOTHER, I get it back just as I set it. > > That seemed to me to be the right thing to do. > > > It might be better if it was returning B38400, rather than BOTHER. > > Should we be using tty_termios_encode_baud_rate() for TCGETS()? > > You can't really do that as you get weird behaviour then when people do > > tcgetattr > |= BOTHER; > speed = 19200; > tcsetattr > > later in the same app > > tcgetattr > speed = 38400 > tcsetattr > > knowing that they set BOTHER already. Hm, true. > I guess you could add both ioctl sets anyway but the plan longer term is > for glibc tcsetattr/getattr to do the right thing with the new ioctls in > all cases, as the glibc interface already provides speed fields. Even with glibc helping, I'm not sure I see how to do the right thing for both the 'old' stty and the case you describe. We'll just have to update stty _if_ we set arbitrary baud rates and want it to display them. -- dwmw2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH] ARM/ARM26: Enable arbitary speed tty ioctls and split input/output speed
- From: Alan Cox <[email protected]>
- Re: [PATCH] $ARCH: Enable arbitary speed tty ioctls and split input/output speed
- From: David Woodhouse <[email protected]>
- Re: [PATCH] $ARCH: Enable arbitary speed tty ioctls and split input/output speed
- From: Alan Cox <[email protected]>
- Re: [PATCH] $ARCH: Enable arbitary speed tty ioctls and split input/output speed
- From: David Woodhouse <[email protected]>
- Re: [PATCH] $ARCH: Enable arbitary speed tty ioctls and split input/output speed
- From: Alan Cox <[email protected]>
- [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- From: David Woodhouse <[email protected]>
- Re: [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- From: Alan Cox <[email protected]>
- Re: [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- From: David Woodhouse <[email protected]>
- Re: [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- From: Alan Cox <[email protected]>
- Re: [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- From: David Woodhouse <[email protected]>
- Re: [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- From: Alan Cox <[email protected]>
- Re: [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- From: David Woodhouse <[email protected]>
- Re: [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- From: Alan Cox <[email protected]>
- Re: [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- From: David Woodhouse <[email protected]>
- Re: [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- From: Alan Cox <[email protected]>
- [PATCH] ARM/ARM26: Enable arbitary speed tty ioctls and split input/output speed
- Prev by Date: Re: Kernel 2.6.22-rc4 netconsole & syslogd bug
- Next by Date: [PATCH -mm] remove CONFIG_UTS_NS and CONFIG_IPC_NS
- Previous by thread: Re: [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- Next by thread: Re: [SERIAL] Don't optimise away baud rate changes when BOTHER is used
- Index(es):