mirror of
https://sourceware.org/git/glibc.git
synced 2025-11-23 00:02:50 +03:00
After getting more experience with the various broken direct-to-ioctl termios2 hacks using Fedora 43 beta, I have found a fair number of cases where the software would fail to set, or clear CIBAUD for non-split-speed operation. Thus it seems will help improve compatibility to clear the kernel-side version of c_cflag & CIBAUD (having the same meaning to the Linux kernel as the speed 0 has for cfsetibaud(), i.e. force the input speed to equal the output speed) for non-split-speed operation, rather than having it explicitly equal the output speed in CBAUD. When writing the code that went into glibc 2.42 I had considered this issue, and had to make an educated guess which way would be more likely to break fewer things. Unfortunately, it appears I guessed wrong. A third option would be to *always* set CIBAUD to __BOTHER, even for the standard baud rates. However, that is an even bigger departure from legacy behavior, whereas this variant mostly preserves current behavior in terms of under what conditions buggy utilities will continue to work. This change is in tcsetattr() rather than ___termios2_canonicalize_speeds(), as it should not be run for tcgetattr(); that would break split speed support for the legacy interface versions of cfgetispeed() and cfsetispeed(). [ v2: fixed comment style ] Resolves: BZ #33340 Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
3.7 KiB
3.7 KiB