tc[gs]etattr and PPC
Thorsten Kukuk
kukuk@suse.de
Sun Feb 10 10:38:00 GMT 2002
Hi,
I got a bug report about glibc/struct termios on PPC.
Since the struct termios is different between glibc and kernel, we
copy the structre. On PPC, we call tc[gs]ettattr for this. But
this functions do some extra checks and return with an error, if
the kernel does not accept CSIZE, PARENB and CREAD.
Some programs like xterm makes TCSETS-ioctls (and don't call
tcsetattr), but we call tcsetattr which fails and return a wrong
error code to the caller.
POSIX says:
The tcsetattr() function shall return successfully if it was able to
perform any of the requested actions, even if some of the requested
actions could not be performed.
so the wrapper in the current implementation is not correct.
How can we fix this? One suggestion is to add an internal flag so
that our tcsetattr does not perform the check, the other is to
remove or fix the wrapper.
Thorsten
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SuSE Linux AG Deutschherrenstr. 15-19 D-90429 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
More information about the Libc-alpha
mailing list