Re: [systemd-devel] [PATCH 2/2] vconsole: set font on tty16..tty63 as well

2015-02-27 Thread David Herrmann
Hi

On Fri, Feb 27, 2015 at 4:09 AM, Zbigniew Jędrzejewski-Szmek
 wrote:
> On Thu, Feb 26, 2015 at 01:37:25PM +0100, Jan Engelhardt wrote:
>>
>> On Wednesday 2015-02-25 21:10, Lennart Poettering wrote:
>> >> >> The setup program would not set the font on tty16 upwards.
>> >> >> There is a maximum of 63 VCs possible in Linux. (That number is
>> >> >> hardcoded.)
>> >> >
>> >> >We deliberately do not support such high VTs in systemds.
>> >>
>> >> And what's the rationale?
>> >
>> >Initially it was that we had the "systemd" udev tag on all VCs, which
>> >made them appear as .device units in systemd, and I really didn't want
>> >63 of them. Then, some of the VC ioctls have a 16bit bitmap, which
>> >makes the higher VCs not as accesible.
>> >What's your usecase for this?
>>
>> No particular usecase. I just stumbled across this arbitrary number
>> 15/16 in the source code while I was figuring out the font reload
>> mess. The patches sent,
>>   vconsole: rerun setup on console takeovers as well
>>   vconsole: match on vtcon events, not fbcon ones,
>> are still very much desired to have included.
> One reason I see is automated tools which want to open many consoles
> (for debug output or whatever), without stepping on the toes of the
> user. They might start with tty20 or something.
>
> If the trick with checking for /dev/vcsXX works, I don't see why
> we shouldn't support the full set provided by the kernel. One magic
> number less is always good.

It does not work. vcs are available if the VT is allocated, but
v_state returns information whether someone actually has the VT
_opened_.

Thanks
David
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/2] vconsole: set font on tty16..tty63 as well

2015-02-26 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Feb 26, 2015 at 01:37:25PM +0100, Jan Engelhardt wrote:
> 
> On Wednesday 2015-02-25 21:10, Lennart Poettering wrote:
> >> >> The setup program would not set the font on tty16 upwards.
> >> >> There is a maximum of 63 VCs possible in Linux. (That number is
> >> >> hardcoded.)
> >> >
> >> >We deliberately do not support such high VTs in systemds.
> >> 
> >> And what's the rationale?
> >
> >Initially it was that we had the "systemd" udev tag on all VCs, which
> >made them appear as .device units in systemd, and I really didn't want
> >63 of them. Then, some of the VC ioctls have a 16bit bitmap, which
> >makes the higher VCs not as accesible.
> >What's your usecase for this?
> 
> No particular usecase. I just stumbled across this arbitrary number
> 15/16 in the source code while I was figuring out the font reload
> mess. The patches sent,
>   vconsole: rerun setup on console takeovers as well
>   vconsole: match on vtcon events, not fbcon ones,
> are still very much desired to have included.
One reason I see is automated tools which want to open many consoles
(for debug output or whatever), without stepping on the toes of the
user. They might start with tty20 or something.

If the trick with checking for /dev/vcsXX works, I don't see why
we shouldn't support the full set provided by the kernel. One magic
number less is always good.

Zbyszek
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/2] vconsole: set font on tty16..tty63 as well

2015-02-26 Thread Jan Engelhardt

On Wednesday 2015-02-25 21:10, Lennart Poettering wrote:
>> >> The setup program would not set the font on tty16 upwards.
>> >> There is a maximum of 63 VCs possible in Linux. (That number is
>> >> hardcoded.)
>> >
>> >We deliberately do not support such high VTs in systemds.
>> 
>> And what's the rationale?
>
>Initially it was that we had the "systemd" udev tag on all VCs, which
>made them appear as .device units in systemd, and I really didn't want
>63 of them. Then, some of the VC ioctls have a 16bit bitmap, which
>makes the higher VCs not as accesible.
>What's your usecase for this?

No particular usecase. I just stumbled across this arbitrary number
15/16 in the source code while I was figuring out the font reload
mess. The patches sent,
vconsole: rerun setup on console takeovers as well
vconsole: match on vtcon events, not fbcon ones,
are still very much desired to have included.

AFAICS, there is just _one_ ioctl with a bitmap, and that is
VT_GETSTATE's v_state member. systemd-vconsole-setup uses
VT_GETSTATE, but never inspect v_state. logind-core.c does - which
raises the question why, when vconsole-setup can do without it.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/2] vconsole: set font on tty16..tty63 as well

2015-02-25 Thread Lennart Poettering
On Tue, 24.02.15 19:53, Jan Engelhardt (jeng...@inai.de) wrote:

> On Tuesday 2015-02-24 19:47, Lennart Poettering wrote:
> 
> >On Tue, 24.02.15 17:49, Jan Engelhardt (jeng...@inai.de) wrote:
> >
> >> The setup program would not set the font on tty16 upwards.
> >> There is a maximum of 63 VCs possible in Linux. (That number is
> >> hardcoded.)
> >
> >We deliberately do not support such high VTs in systemds.
> 
> And what's the rationale?

Initially it was that we had the "systemd" udev tag on all VCs, which
made them appear as .device units in systemd, and I really didn't want
63 of them. Then, some of the VC ioctls have a 16bit bitmap, which
makes the higher VCs not as accesible. Mostly it's now though that the
concept of having that many VCs is kinda crazy...

What's your usecase for this?

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/2] vconsole: set font on tty16..tty63 as well

2015-02-24 Thread Jan Engelhardt
On Tuesday 2015-02-24 19:53, Jan Engelhardt wrote:

>On Tuesday 2015-02-24 19:47, Lennart Poettering wrote:
>
>>On Tue, 24.02.15 17:49, Jan Engelhardt (jeng...@inai.de) wrote:
>>
>>> The setup program would not set the font on tty16 upwards.
>>> There is a maximum of 63 VCs possible in Linux. (That number is
>>> hardcoded.)
>>
>>We deliberately do not support such high VTs in systemds.
>
>And what's the rationale?

Right, VT_GETSTATE gives a bitmask which only contains 16 bits,
that's the "vcs.v_active" just a few lines above the change that I did 
apparently.

However, it also seems that we do not need to rely on v_state. /dev/vcsN 
is present if it is active, and is absent when deallocated -- at least 
when /dev is dynamically managed, which I figure might be a requirement 
for systemd.

[suggestive patch in reply hereto]
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/2] vconsole: set font on tty16..tty63 as well

2015-02-24 Thread Jan Engelhardt
On Tuesday 2015-02-24 19:47, Lennart Poettering wrote:

>On Tue, 24.02.15 17:49, Jan Engelhardt (jeng...@inai.de) wrote:
>
>> The setup program would not set the font on tty16 upwards.
>> There is a maximum of 63 VCs possible in Linux. (That number is
>> hardcoded.)
>
>We deliberately do not support such high VTs in systemds.

And what's the rationale?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH 2/2] vconsole: set font on tty16..tty63 as well

2015-02-24 Thread Lennart Poettering
On Tue, 24.02.15 17:49, Jan Engelhardt (jeng...@inai.de) wrote:

> The setup program would not set the font on tty16 upwards.
> There is a maximum of 63 VCs possible in Linux. (That number is
> hardcoded.)

We deliberately do not support such high VTs in systemds. If you want
such high VTs, then please patch this downstream. 

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel