This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
tc[gs]etattr and PPC
- From: Thorsten Kukuk <kukuk at suse dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: Sun, 10 Feb 2002 19:14:18 +0100
- Subject: tc[gs]etattr and PPC
- Organization: SuSE GmbH, Nuernberg, Germany
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