Dear all,

Based on the discussion these days, there is an update version
of summary. It introduces the behavior of /dev/vt on devname
file system for VT. Your comments are appreciated.

1. The device nodes under /dev/vt are managed by devname
file system built-in functions. These files are real device
nodes instead of some symlinks to /devices. Accordingly,
ddi_create_minor_node() will not be used any longer.

2. When the VT nodes were accessed by user/apps at the first time,
corresponding lookup()/readdir() routines will create these nodes.
These file have "root:tty" ownership and mode "0620" as default
attributes. These properties will also be changed after a user
login, which is as same as what will be done for /dev/console.

3. There is a count number for all valid VT nodes in system.
All the valid nodes can be displayed by 'ls' command, and can
be accessed by privilege user. The count number can be changed.
Its default value is 16. After increase/decrease this count,
the valid VT nodes under /dev/vt will be changed during next
accessing time accordingly.

For instance:

By default, there are 7 VT are using by console-login
and graphic login.

A. run "ls /dev/vt", it displays all 16 VT nodes from "0" to "15"
and one active link file.

B. run "ls /dev/vt/16", it will report "no such file".

4. The name of active link file is /dev/vt/active, which is a
symlink file and points to the current active node,
like "/dev/vt/3". Its ownership is "root:sys", and mode is "0777".
This file is always available for end user.

Whenever this file 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 ).

5. Summary

- All VT nodes under /dev/vt are real nodes, and will not be managed
   by ddi_create_minor_node.
- There is a count number for valid VT nodes. Default count is 16.
   All valid VT nodes can display with "ls" command regardless it is
   in-use (link open(2) or whatever) or not. The count number can be
   configured dynamically.
- Active link file is a symlink which points to the active node under
   /dev/vt. It requests an expansion of current devname filesystem
- The content of active link file is always correct because it will be
   validated during accessing every time.
- There is no create/remove operations for end user under
   /dev/vt directory. All these create/remove operations will be
   done internal.

Thanks in advance for your time!


Reply via email to