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