[uClibc]Job Control on /dev/console

Andrew May acmay at acmay.homeip.net
Wed Nov 27 23:54:52 UTC 2002


On Wed, Nov 27, 2002 at 12:02:20PM -0800, Andrew May wrote:
> On Wed, Nov 27, 2002 at 11:53:23AM -0700, Erik Andersen wrote:
> > On Wed Nov 27, 2002 at 10:33:11AM -0800, Andrew May wrote:
> > > I get the "job control turned off" print when I start a shell on /dev/console,
> > > on my PPC405 system.
> > > 
> > > The tty command returns /dev/console. I don't know how to set inittab to spawn
> > > off a getty for /dev/console, so I just spawn off a shell.
> > 
> > Job control is turned off since you cannot get a controlling
> > terminal on /dev/console.  The kernel will not allow it.  Run
> > your shell on a normal tty such as ttyS0 or tty1 and you will be
> > fine.  Or you can hack your kernel if you are into that sortof
> > thing.
> > 
> >     http://lists.linuxppc.org/linuxppc-dev/200201/msg00287.html
> 
> Well I am using devfs, and have a link for ttyS[01] to tts/[01], but
> I can't get getty to work on either of the serial ports.
> 
> Here is an strace, /dev/console and /dev/ttyS[01] all seem to fail
> the same ioctl.
> 

Well looking into it some more, it seems to be a header file mismatch,
but I am not sure what to do to fix it.

> /dev # strace getty 9600 ttyS1 
> execve("/sbin/getty", ["getty", "9600", "ttyS1"], [/* 7 vars */]) = 0
> ioctl(0, 0x402c7413, 0x7ffffd38)        = 0
> ioctl(1, 0x402c7413, 0x7ffffd38)        = 0

.....................

> ioctl(0, 0x403c7413, 0x7ffffd78)        = -1 EINVAL (Invalid argument)


#define TCGETS _IOR('t', 19, struct termios)

There are 2 calls for the TCGETS ioctl, with a sizeof(termios) = 0x2c
and the one that fails with sizeof(termios) = 0x3c

./uClibc-0.9.16/libc/sysdeps/linux/powerpc/bits/termios.h 
has the sizeof() = 0x3c, but the kernel has the sizeof() 0x2c.

Should the uClibc copy of the file go away?

-------------- next part --------------
./staging_dir/include/bits/termios.h:#define NCCS 32
./staging_dir/include/asm/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-ppc64/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-i386/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-mips/termbits.h:#define NCCS	23
./linux-2.4.19/include/asm-alpha/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-m68k/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-sparc/termbits.h:#define NCCS 17
./linux-2.4.19/include/asm-ppc/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-sparc64/termbits.h:#define NCCS 17
./linux-2.4.19/include/asm-arm/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-sh/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-ia64/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-mips64/termbits.h:#define NCCS	23
./linux-2.4.19/include/asm-s390/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-parisc/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-cris/termbits.h:#define NCCS 19
./linux-2.4.19/include/asm-s390x/termbits.h:#define NCCS 19
./uClibc-0.9.16/include/bits/termios.h:#define NCCS 32
./uClibc-0.9.16/libc/sysdeps/linux/alpha/bits/termios.h:#define NCCS 32
./uClibc-0.9.16/libc/sysdeps/linux/common/bits/termios.h:#define NCCS 32
./uClibc-0.9.16/libc/sysdeps/linux/mips/bits/termios.h:#define NCCS 32
./uClibc-0.9.16/libc/sysdeps/linux/powerpc/bits/termios.h:#define NCCS 32
./uClibc-0.9.16/libc/sysdeps/linux/sparc/bits/termios.h:#define NCCS 17


More information about the uClibc mailing list