[Devel] [PATCH rh7] tty: vzcon -- Add container dummy console support

Cyrill Gorcunov gorcunov at virtuozzo.com
Wed Jun 17 10:51:46 PDT 2015


On Wed, Jun 17, 2015 at 08:07:37PM +0300, Vladimir Davydov wrote:
> > 
> > I tried, but pty code is shared between unix98 ptys and bsd ptys
> > already, adding more tweaks there make it almost unreadable (at
> > least for me).
> 
> OK, but what prevents us from using all methods of unix98 pty unmodified
> except write and write_room (just curious)?

There are a few problems: we use own devices based on veid, which is
no longer suitable considering that we're moving to uuid based containers
(so I created two devices /dev/vzcons which stands for slave peer, thus
vzctl or anyone else to read from container's console simply to open
this device). To make this possible i've to allocate new class vzcon
in device hierarchy (note we have device namespaces now which). Also
ptys don't support lookup while as far as I understand we need it.
That said some methods of pty is suitable for us and I consider
adding EXPORT_SYMBOL(pty_write_room) there to reuse them but
the driver itself better to be placed into a separate file I think.
Also I think we don't need all many virtual consoles (note that
this virtual console is not a console in traditional meaning
of linux, where console stands for system device kernel writes
messages to so one can add a number of console= kernel options
to redirect kernel output).



More information about the Devel mailing list