[kbd] New vt_mode tool for kbd?

Dmitry V. Levin ldv at altlinux.org
Mon Mar 28 11:19:18 UTC 2011


On Sun, Mar 27, 2011 at 01:33:23PM +0400, Alexey Gladkov wrote:
> 27.03.2011 01:33, Dmitry V. Levin wrote:
> > Multi-value exit status is not quite script-friendly, especially for
> > values greater than 128, because exit codes greater than 128 are used
> > by the shell to indicate that a program died due to a fatal signal.
> 
> I do not really like the idea of ​​creating for each ioctl by the utility.
> 
> Does anyone have any suggestions on how combine all the requests in a
> single utility?

Usage: kbdinfo [-C DEVICE] getmode [text|graphics]
       kbdinfo [-C DEVICE] gkbmode [raw|xlate|mediumraw|unicode]
       kbdinfo [-C DEVICE] gkbmeta [metabit|escprefix]

If only one argument is given, then just print the current mode to stdout
and exit 0 (unless ioctls returned an error).

If two arguments are given, then print nothing to stdout and exit 0 iff
the current mode matches the mode described by these two arguments.

This interface would be both script-friendly and extensible.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.altlinux.org/pipermail/kbd/attachments/20110328/e61de2e9/attachment.bin>


More information about the kbd mailing list