This is the mail archive of the
mailing list for the glibc project.
Re: tc[gs]etattr and PPC
- From: Thorsten Kukuk <kukuk at suse dot de>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: Ulrich Drepper <drepper at redhat dot com>,libc-alpha at sources dot redhat dot com
- Date: Sun, 10 Feb 2002 21:48:59 +0100
- Subject: Re: tc[gs]etattr and PPC
- Organization: SuSE GmbH, Nuernberg, Germany
- References: <20020210191418.A4527@suse.de> <email@example.com> <firstname.lastname@example.org>
On Sun, Feb 10, Andreas Schwab wrote:
> Ulrich Drepper <email@example.com> writes:
> |> Thorsten Kukuk <firstname.lastname@example.org> writes:
> |> > 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.
> |> You haven't given an example why you think it's wrong. Not calling
> |> the kernel for unimplemented functionality and failing is correct.
> |> What the text above means is that is any of the defined actions fail
> |> (like changing the baud rate if supported) tcsetattr() still returns
> |> successfully. What exactly do you have in mind?
> The tcsetattr wrapper checks if any of CSIZE, PARENB, CREAD have not been
> performed. But it does not take into account that there might be other
> changes that do have been performed, and thus tcsetattr should return
> sucessfully anyway. The following program reports an error although
> TOSTOP has been successfully modified:
This is one problem. The other problem is, that the ioctl call on
PPC thinks it has to fail, because tcsetattr fails. But we only call
tcsetattr to convert the data structs, the ioctl itself must not
Thorsten Kukuk http://www.suse.de/~kukuk/ email@example.com
SuSE GmbH Deutschherrenstr. 15-19 D-90429 Nuernberg
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B