This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: libc struct termios <--> kernel struct termios, how?
- To: Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
- Subject: Re: libc struct termios <--> kernel struct termios, how?
- From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- Date: 03 Jun 1998 10:50:57 +0200
- Cc: libc-alpha@cygnus.com, linuxppc-dev@cs.wisc.edu
- References: <199806021533.IAA00431@cygnus.com>
Franz Sirl <Franz.Sirl-kernel@lauterbach.com> writes:
|> while investigating an ioctl() "invalid argument" in top (from
|> procps-1.2.7) on glibc-2.0.93/powerpc, I wondered what's the correct
|> include file for 'struct termios' and 'TCGETS'. top currently includes
|> <termios.h>, but the definition there differs from from the kernel
|> definition (NCCS is 32 resp. 19). Since sizeof(struct termios) is coded
|> into TCGETS, top will use a value for TCGETS which is not understood by the
|> kernel.
|>
|> What is the correct solution for that? Using <asm/termios.h>?
The correct solution is to use tc[gs]etattr. For compatibility you'll
probably have to redefine TCGETS in terms of struct __kernel_termios in
<bits/termios.h>. The Sparc port avoids that by using the same struct
termios as the kernel.
Andreas.
--
Andreas Schwab "And now for something
schwab@issan.informatik.uni-dortmund.de completely different"
schwab@gnu.org