This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

tc[gs]etattr and PPC



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]