Re: [PATCH] char/tty_io: fix legacy pty name when more than 256 ptydevices are requested

From: H. Peter Anvin
Date: Thu Sep 10 2009 - 16:39:40 EST


On 09/10/2009 01:05 PM, Mauro Carvalho Chehab wrote:
>>
>> Yes, but you have to port the application *anyway* do deal with the
>> namespace.
>
> Or create some udev rules for that.
>

udev rules does zero good, because the way the BSD ptys go, the
application itself needs to understand what the naming scheme is. So it
is an application-by-application slog.

>> BSD tty allocation is done largely by each application,
>> which makes it even worse. Furthermore, there is the static allocation
>> issue, so unless there is a concrete application which needs this *and*
>> cannot be ported to Unix98 ptys (which is the Right Thing[TM] to do) I
>> think Alan is right.
>
> The amount of static allocation space can be controlled via pty.legacy_count
> boot parameter. It overrides whatever specified at CONFIG_LEGACY_PTY_COUNT.
> You can even let LEGACY_PTY_COUNT = 0 and enable the actual numbers of needed
> legacy ptys via boot parameter, where needed. So, this is not a problem on a
> real situation.

It still means you are statically allocating a fixed number at boot time.

-hpa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/