In general, we suggest to let "vtdaemon" maintain the symlink.
-------- Original Message --------
Subject: devname and VT
Date: Mon, 02 Jul 2007 17:03:12 +0800
From: LingBo Tang <lingbo.t...@sun.com>
To: Edward Pilatowicz <Edward.Pilatowicz at Sun.COM>, Vikram Hegde
<Vikram.Hegde at Sun.COM>, Jerry Gilliam <jg at jurassic.sfbay.sun.com>, Artem
Kachitchkine <Artem.Kachitchkin at Sun.COM>
CC: virtual-console-iteam <virtual-console-iteam at sun.com>
According to recent research on "devname filesysetm" for "active
link node" in VT, I have following summary.
1. the device nodes under /dev/vt are managed by build-in devname
file system. During the first access, lookup() routine will create
the node if the user has privilege. This file is a real device node
instead of symlink to /devices. Accordingly, ddi_create_minor_node()
will not be used for device node management.
On the other hand, because there is no master node for VT, we will
decrease the number of device nodes during readdir().
This will cause below result:
ls /dev/vt/200 -> success
ls /dev/vt -> '200' can not be displayed
A workaround can avoid above issue, like defining a static number
as max threshold when display files under /dev/vt. ( users can
modify the threshold explicitly ) But this workaround seems lose
the advantage of dynamic allocation/deallocation from devname file
2. The active node name is /dev/vt/active, which is a symlink file
and points to the current active console, like "/dev/vt/3".
Whenever the symlink is accessed, its content will be validated
and refreshed if the active node was changed.
In order to support create symlink, devname file system need to be
expanded a little ( although its plug-in module can support symlink ).
- current VT usage model is not match with devname as other cases,
like pts and clearview;
- manage active link as symlink in devname filesystem requests expand
- VT daemon can update the contents of "active link" by two syscalls,
which only have a very small time window for potential incorrect
plug-in device accessing.
- suggest to manage "active link" by VT daemon and support devname file
system as an enhancement for VT if necessary in future.