chvt utility and device node symlinks

Denis Vlasenko vda.linux at googlemail.com
Mon Mar 19 21:33:36 UTC 2007


On Monday 19 March 2007 22:10, Clint Thomas wrote:
> I want to use the chvt utility in busybox so that I can connect to
> another device I have on the system through serial. My problem is that

What exactly do you want? You sit on e.g. ttyS0 and want
to give a command and magically start working on ttyS1??
But it is not possible, you are physically connected to ttyS0!

> chvt looks specifically for a /dev/ttyX where X is the argument passed
> to chvt as a number. The device I want to talk to is /dev/tts/X, so I
> tried making a symlink to it like this
> 
> ln -s /dev/tts/X /dev/ttyX

chvt's purpose is to switch Linux virtual consoles
on a physically the same harware where they are multiplexed -
PC screen. It does this using ioctl:

ioctl(3, VT_WAITACTIVE, 0x2)

It will never work for any other tty devices, I think, because
they are not sharing the same hardware, like VTs do.
--
vda



More information about the busybox mailing list