[systemd-devel] [PATCH 2/2] vconsole-setup: setup negative conditional on uml

Lennart Poettering lennart at poettering.net
Sun Jul 21 17:14:43 PDT 2013


On Sat, 20.07.13 15:55, Ramkumar Ramachandra (artagnon at gmail.com) wrote:

> 
> Kay Sievers wrote:
> > I would rather see vconsole to detect the mess and silently give up,
> > instead of adding exotic options for really weird faked and wrong tty0
> > setups.
> 
> um Linux lacks VT102 emulation, and this is a documented fact.
> Therefore, your code:
> 
>         unsigned char data[1];
> 
>         data[0] = TIOCL_GETFGCONSOLE;
>         return ioctl(fd, TIOCLINUX, data) >= 0;
> 
> is guaranteed to fail.  Not because something went "wrong", or due to
> some "mess" or "fakeness", but because it was perfectly expected.  I
> discussed this on LKML, and posted an explanation about this already
> [1].
> 
> That said, I don't know what to do about
> systemd-vconsole-setup.service: I just followed Zbyszek's suggestion.
> Penalizing um Linux for not doing VT102 emulation, and always failing
> a service seems user-unfriendly to me.
> 
> [1]: http://lists.freedesktop.org/archives/systemd-devel/2013-July/012150.html

UML shouldn't be penalized for not implementing some terminal emulation,
but it should be penalized for doing so under the label of "VT support",
which it simply is not providing.

They can call their ttys any way they want. If the call them
/dev/tty[1..64] however, then they need to implement the VC
interfaces. All of them.

Also note that some hypervisors implement /dev/hvc0, /dev/xvc0,
/dev/hvsi0 and suchlike. Theser are also ttys, which are used for
interfacing in a VT-like way the virtual machines. But they do not claim
to ve the real VT, they hence picked different tty names.

UML should follow the same route: pick some name you like, or even
better, pick one of the existing hypervisor tty names if the interface
and usecase is the same, but do not use /dev/tty[1..64], because that is
the VT subsystem.

systemd handles the hvc0, xvc0, hvsi0 automatically already. We'd be
happy if UML could make use of the same logic.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list