[systemd-devel] [PATCH 2/2] vconsole-setup: setup negative conditional on uml
kay at vrfy.org
Sat Jul 20 03:34:46 PDT 2013
On Sat, Jul 20, 2013 at 12:25 PM, 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
> um Linux lacks VT102 emulation, and this is a documented fact.
Providing tty0 and not working VT doesn't sound right. There is
already a condition in the unit file that would make sure to do the
Documenting it doesn't make it less fake, there should just be no tty0
if VTs are not working.
> Therefore, your code:
> unsigned char data;
> data = 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
It's just about the existence of tty0 which indicates a working VT.
> 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.
It's not about failing it, that would be ugly, sure. Vconsole can just
give up and return 0 if it finds a tt0 that actually isn't a tty0.
That would work for all future mis-implementations of tty0 too,
without adding more conditions. :)
More information about the systemd-devel