OSDN Git Service

caf9352b824ca0ef0e83d817003d7393c701c739
[linuxjm/LDP_man-pages.git] / draft / man4 / console_ioctl.4
1 .\" Copyright (c) 1995 Jim Van Zandt <jrv@vanzandt.mv.com> and aeb
2 .\" Sun Feb 26 11:46:23 MET 1995
3 .\"
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, write to the Free
21 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
22 .\" USA.
23 .\"
24 .\" Modified, Sun Feb 26 15:04:20 1995, faith@cs.unc.edu
25 .\" Modified, Thu Apr 20 22:08:17 1995, jrv@vanzandt.mv.com
26 .\" Modified, Mon Sep 18 22:32:47 1995, hpa@storm.net (H. Peter Anvin)
27 .\" FIXME The following are not documented:
28 .\"     KDFONTOP (since 2.1.111)
29 .\"     KDGKBDIACRUC (since 2.6.24)
30 .\"     KDSKBDIACR
31 .\"     KDSKBDIACRUC (since 2.6.24)
32 .\"     KDKBDREP (since 2.1.113)
33 .\"     KDMAPDISP (not implemented as at 2.6.27)
34 .\"     KDUNMAPDISP (not implemented as at 2.6.27)
35 .\"     VT_LOCKSWITCH (since 1.3.47, needs CAP_SYS_TTY_CONFIG)
36 .\"     VT_UNLOCKSWITCH (since 1.3.47, needs CAP_SYS_TTY_CONFIG)
37 .\"     VT_GETHIFONTMASK (since 2.6.18)
38 .\"
39 .\" Japanese Version Copyright (c) 1996,1997 TAKAHASHI Mutsuji
40 .\"                                1998      ISHIKAWA Mutsumi
41 .\"                               all rights reserved.
42 .\" Translated Sun Jan 11 03:24:14 JST 1998
43 .\"         by TAKAHASHI Mutsuji <muz@ilp.iijnet.or.jp>
44 .\"            and ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
45 .\"
46 .\" Japanese Version Last Modified Thu Feb  5 17:35:37 JST 1998
47 .\"     by ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
48 .\" Updated & Modefied Sat Feb 27 1999 by Shouichi Saito
49 .\" Updated Tue Jan 28 JST 2003 by Kentaro Shirakata <argrath@ub32.org>
50 .\"
51 .TH CONSOLE_IOCTL 4 2009-02-28 "Linux" "Linux Programmer's Manual"
52 .\"O .SH NAME
53 .SH 名前
54 .\"O console_ioctl \- ioctl's for console terminal and virtual consoles
55 console_ioctl \- コンソール端末と仮想コンソールの ioctl
56 .\"O .SH DESCRIPTION
57 .SH 説明
58 .\"O The following Linux-specific
59 .\"O .BR ioctl (2)
60 .\"O requests are supported.
61 .\"O Each requires a third argument, assumed here to be \fIargp\fP.
62 次のような Linux 固有の
63 .BR ioctl (2)
64 がサポートされている。
65 それぞれ3番目の引数が必要である、ここでは \fIargp\fP とする。
66 .IP \fBKDGETLED\fP
67 .\"O Get state of LEDs.
68 .\"O \fIargp\fP points to a \fIchar\fP.
69 .\"O The lower three bits
70 .\"O of \fI*argp\fP are set to the state of the LEDs, as follows:
71 LED の状態を取得する。
72 \fIargp\fP は \fIchar\fP のポインターである。
73 \fI*argp\fP の下位 3 ビットに以下のように LED の状態がセットされる。
74
75 .\"O     LED_CAP       0x04   caps lock led
76 .\"O     LEC_NUM       0x02   num lock led
77 .\"O     LED_SCR       0x01   scroll lock led
78     LED_CAP       0x04   キャピタルロックが点灯
79     LEC_NUM       0x02   ナンバーロックが点灯
80     LED_SCR       0x01   スクロールロックが点灯
81 .IP \fBKDSETLED\fP
82 .\"O Set the LEDs.
83 .\"O The LEDs are set to correspond to the lower three bits of
84 .\"O \fIargp\fP.
85 .\"O However, if a higher order bit is set,
86 .\"O the LEDs revert to normal: displaying the state of the
87 .\"O keyboard functions of caps lock, num lock, and scroll lock.
88 LEDを点灯させる。LEDは \fIargp\fP の下位 3 ビットに従い点灯される。
89 しかし、より高位のビットがセットされている時には、キャピタルロック、
90 ナンバーロック、スクロールロックのキーボード機能の状態を表示する LED は
91 通常状態に戻る。
92 .LP
93 .\"O Before 1.1.54, the LEDs just reflected the state of the corresponding
94 .\"O keyboard flags, and KDGETLED/KDSETLED would also change the keyboard
95 .\"O flags.
96 .\"O Since 1.1.54 the leds can be made to display arbitrary
97 .\"O information, but by default they display the keyboard flags.
98 .\"O The following two ioctl's are used to access the keyboard flags.
99 カーネル 1.1.54 以前は、LED はそれぞれのキーボードフラグの状態を反映する
100 だけで、KDGETLED/KDSETLED もキーボードフラグを変更するだけであった。
101 カーネルl 1.1.54 からは LED に任意の表示をする事ができるようになったが、
102 デフォルトではキーボードフラグを表示する。
103 次に示す 2 つの ioctl はキーボードフラグにアクセスするのに用いられる。
104 .IP \fBKDGKBLED\fP
105 .\"O Get keyboard flags CapsLock, NumLock, ScrollLock (not lights).
106 .\"O \fIargp\fP points to a char which is set to the flag state.
107 .\"O The low order three bits (mask 0x7) get the current flag state,
108 .\"O and the low order bits of the next nibble (mask 0x70) get
109 .\"O the default flag state.
110 .\"O (Since 1.1.54.)
111 キャピタルロック、ナンバーロック、スクロールロックの(LED の表示では
112 なく)キーボードフラグを得る。
113 \fIargp\fP はフラグの状態がセットされる文字変数を指す。
114 (0x7)でマスクして得られる下位 3 ビットが現在のフラグの状態を示し、
115 (0x70)でマスクして得られる次の 3 ビットがデフォルトのフラグの状態を
116 示す。(カーネル 1.1.54以降)
117 .IP \fBKDSKBLED\fP
118 .\"O Set keyboard flags CapsLock, NumLock, ScrollLock (not lights).
119 .\"O \fIargp\fP has the desired flag state.
120 .\"O The low order three bits (mask 0x7) have the flag state,
121 .\"O and the low order bits of the next nibble (mask 0x70) have
122 .\"O the default flag state.
123 .\"O (Since 1.1.54.)
124 キャピタルロック、ナンバーロック、スクロールロックの(LED の表示ではなく)
125 キーボードフラグをセットする。
126 \fIargp\fP がセットしたいフラグである。
127 (0x7)でマスクして得られる下位 3 ビットがフラグの状態で、(0x70)でマスクして
128 得られる次の 3 ビットがデフォルトのフラグの状態である。(カーネル
129 1.1.54以降)
130 .IP \fBKDGKBTYPE\fP
131 .\"O Get keyboard type.
132 .\"O This returns the value KB_101, defined as 0x02.
133 キーボードの種類を得る。これは値 0x02 と定義されている KB_101を返す。
134 .IP \fBKDADDIO\fP
135 .\"O Add I/O port as valid.
136 .\"O Equivalent to \fPioperm(arg,1,1)\fP.
137 I/Oポートを有効な物として加える。これは \fIioperm(arg,1,1)\fP と等価である。
138 .IP \fBKDDELIO\fP
139 .\"O Delete I/O port as valid.
140 .\"O Equivalent to \fIioperm(arg,1,0)\fP.
141 I/Oポートを有効な物から外す。これは \fIioperm(arg,1,0)\fP と等価である。
142 .IP \fBKDENABIO\fP
143 .\"O Enable I/O to video board.
144 .\"O Equivalent to \fIioperm(0x3b4, 0x3df-0x3b4+1, 1)\fP.
145 ビデオボードへの I/O を可能にする。
146 これは \fIioperm(0x3b4, 0x3df-0x3b4+1, 1)\fP と等価である。
147 .IP \fBKDDISABIO\fP
148 .\"O Disable I/O to video board.
149 .\"O Equivalent to \fIioperm(0x3b4, 0x3df-0x3b4+1, 0)\fP.
150 ビデオボードへの I/O を不可能にする。
151 これは \fIioperm(0x3b4, 0x3df-0x3b4+1, 0)\fP と等価である。
152 .IP \fBKDSETMODE\fP
153 .\"O Set text/graphics mode.
154 .\"O \fIargp\fP is one of these:
155 テキスト/グラフィクスモードを設定する。
156 \fIargp\fP は次のうちのどれか:
157
158     KD_TEXT       0x00
159     KD_GRAPHICS   0x01
160 .IP \fBKDGETMODE\fP
161 .\"O Get text/graphics mode.
162 .\"O \fIargp\fP points to a \fIlong\fP which is set to one
163 .\"O of the above values.
164 テキスト/グラフィクスモードを取得する。
165 \fIargp\fP が指す \fIlong\fP 型変数に
166 上述の値のどちらかがセットされる。
167 .IP \fBKDMKTONE\fP
168 .\"O Generate tone of specified length.
169 .\"O The lower 16 bits of \fIargp\fP specify the period in clock cycles,
170 .\"O and the upper 16 bits give the duration in msec.
171 .\"O If the duration is zero, the sound is turned off.
172 .\"O Control returns immediately.
173 .\"O For example, \fIargp\fP = (125<<16) + 0x637 would specify
174 .\"O the beep normally associated with a ctrl-G.
175 .\"O (Thus since 0.99pl1; broken in 2.1.49-50.)
176 指定された長さのトーンを発生する。
177 \fIargp\fP の下位 16 ビットはクロックサイクルを単位にして周期を指定し、
178 上位 16 ビットが msec の単位で表した、(トーンを発生させる)時間を指定する。
179 トーンを発生させる時間がゼロのときは、サウンドはオフになる。
180 制御は直ちに戻る。
181 例えば、\fIargp\fP = (125<<16) + 0x637 とすれば、通常 ctrl-G を押した時に
182 発生する音になる。
183 (カーネル 0.99pl1 以降;この機能は カーネル 2.1.49 から
184 2.1.50 ではバグのため動作しない)
185 .IP \fBKIOCSOUND\fP
186 .\"O Start or stop sound generation.
187 .\"O The lower 16 bits of
188 .\"O \fIargp\fP specify the period in clock cycles
189 .\"O (that is, \fIargp\fP = 1193180/frequency).
190 .\"O \fIargp\fP = 0 turns sound off.
191 .\"O In either case, control returns immediately.
192 音の発生の開始や停止を行う。
193 \fIargp\fP の下位 16 ビットはクロックサイクルを単位として周期を示す。
194 (つまり \fIargp\fP = 1193180/周波数)。
195 \fIargp\fP = 0 の場合、サウンドはオフになる。
196 どちらの場合でも、ただちに制御は戻る。
197 .IP \fBGIO_CMAP\fP
198 .\"O Get the current default color map from kernel.
199 .\"O \fIargp\fP points to
200 .\"O a 48-byte array.
201 .\"O (Since 1.3.3.)
202 現在のデフォルトのカラーマップをカーネルより取得する。
203 .\"O \fIargp\fP は 48 バイトの配列へのポインター。(カーネル 1.3.3 以降)
204 .IP \fBPIO_CMAP\fP
205 .\"O Change the default text-mode color map.
206 .\"O \fIargp\fP points to a
207 .\"O 48-byte array which contains, in order, the Red, Green, and Blue
208 .\"O values for the 16 available screen colors: 0 is off, and 255 is full
209 .\"O intensity.
210 .\"O The default colors are, in order: black, dark red, dark
211 .\"O green, brown, dark blue, dark purple, dark cyan, light grey, dark
212 .\"O grey, bright red, bright green, yellow, bright blue, bright purple,
213 .\"O bright cyan and white.
214 .\"O (Since 1.3.3.)
215 デフォルトのテキストモードのカラーマップを変更する。
216 \fIargp\fP が指す 48 バイトの配列中には、16 の可能なスクリーンの色を、
217 赤、緑、青の順に 0 をオフ、255を最大強度とした値として納める。
218 デフォルトの色は順に、黒、濃い赤、濃い緑、茶、濃い青、濃い紫、濃いシアン、
219 明るい灰色、濃い灰色、明るい赤、明るい緑、黄、明るい青、明るい紫、
220 明るいシアン、白である。(カーネル 1.3.3以降)
221 .IP \fBGIO_FONT\fP
222 .\"O Gets 256-character screen font in expanded form.
223 .\"O \fIargp\fP points to an 8192 byte array.
224 .\"O Fails with error code \fBEINVAL\fP if the
225 .\"O currently loaded font is a 512-character font, or if the console is
226 .\"O not in text mode.
227 拡張された形式で 256 文字のスクリーンフォントを得る。
228 \fIargp\fP は 8192 バイトの配列を指す。
229 現在ロードされているフォントが 512 文字のフォントであるか、コンソールが
230 テキストモードでない時には失敗し \fBEINVAL\fP のエラーコードを返す。
231 .IP \fBGIO_FONTX\fP
232 .\"O Gets screen font and associated information.
233 .\"O \fIargp\fP points to a
234 .\"O struct consolefontdesc (see \fBPIO_FONTX\fP).
235 .\"O On call, the
236 .\"O \fIcharcount\fP field should be set to the maximum number of
237 .\"O characters that would fit in the buffer pointed to by \fIchardata\fP.
238 .\"O On return, the \fIcharcount\fP and \fIcharheight\fP are filled with
239 .\"O the respective data for the currently loaded font, and the
240 .\"O \fIchardata\fP array contains the font data if the initial value of
241 .\"O \fIcharcount\fP indicated enough space was available; otherwise the
242 .\"O buffer is untouched and \fIerrno\fP is set to \fBENOMEM\fP.
243 .\"O (Since 1.3.1.)
244 スクリーンフォントとそれに関連した情報を取得する。
245 \fIargp\fP は構造体 consolefontdesc (\fBPIO_FONTX\fP を参照のこと)を指す。
246 関数呼び出しのときには、\fIcharcount\fP には、\fIchardata\fP が指す
247 バッファにおさまる最大の文字数をセットしなければならない。
248 関数呼び出しから戻った時には \fIcharcount\fP と \fIcharheight\fP には、
249 現在ロードされているフォントの該当するデータが収められている。
250 配列 \fIchardata\fP には、最初に \fIcharcount\fP にいれた値によって
251 フォントを収めるのに十分なスペースがあるとわかればフォントデータが収められる。
252 そうでない時には、バッファは変更されず、 \fIerrno\fP に \fBENOMEM\fP が
253 セットされる(カーネル 1.3.1 以降)。
254 .IP \fBPIO_FONT\fP
255 .\"O Sets 256-character screen font.
256 .\"O Load font into the EGA/VGA character
257 .\"O generator.
258 .\"O \fIargp\fP points to a 8192 byte map, with 32 bytes per
259 .\"O character.
260 .\"O Only first \fIN\fP of them are used for an 8x\fIN\fP font
261 .\"O (0 < \fIN\fP <= 32).
262 .\"O This call also invalidates the Unicode mapping.
263 256 文字のフォントをセットする。EGA/VGA キャラクタージェネレーター
264 (character generator) にフォントをロードする。
265 \fIargp\fP は、8192 バイト(一文字 32 バイト)のマップを指す。
266 マップのうち、最初の \fIN\fP のみが 8x\fIN\fP のフォントのために
267 用いられる(0 < \fIN\fP <= 32)。
268 この呼び出しをすると Unicode のマッピングが無効になる。
269 .IP \fBPIO_FONTX\fP
270 .\"O Sets screen font and associated rendering information.
271 .\"O \fIargp\fP
272 .\"O points to a
273 スクリーンフォントと、それに関連するレンダリング情報をセットする。
274 \fIargp\fP は、以下の構造体を指す。
275
276 .in +4n
277 .nf
278 struct consolefontdesc {
279 .\"O     unsigned short charcount;  /* characters in font
280 .\"O                                   (256 or 512) */
281 .\"O     unsigned short charheight; /* scan lines per
282 .\"O                                   character (1-32) */
283 .\"O     char          *chardata;   /* font data in
284 .\"O                                   expanded form */
285     unsigned short charcount;  /* フォントの文字数
286                                   (256 または 512) */
287     unsigned short charheight; /* 一文字の走査線の数
288                                   (1-32) */
289     char          *chardata;   /* 展開されたフォントデータ */
290 };
291 .fi
292 .in
293
294 .\"O If necessary, the screen will be appropriately resized, and
295 .\"O \fBSIGWINCH\fP sent to the appropriate processes.
296 .\"O This call also invalidates the Unicode mapping.
297 .\"O (Since 1.3.1.)
298 必要ならスクリーンは適当にサイズ変更され、\fBSIGWINCH\fP が適切な
299 プロセスに送られる。
300 このコールにより Unicode のマッピングが無効になる。
301 .IP \fBPIO_FONTRESET\fP
302 .\"O Resets the screen font, size and Unicode mapping to the bootup
303 .\"O defaults.
304 .\"O \fIargp\fP is unused, but should be set to NULL to
305 .\"O ensure compatibility with future versions of Linux.
306 .\"O (Since 1.3.28.)
307 スクリーンフォント、サイズ、 Unicode マッピングをブート時のデフォルト値に
308 リセットする。\fIargp\fP は用いられないが、将来のバージョンの
309 Linux との互換性を保つために NULL にセットすべきである。
310 .IP \fBGIO_SCRNMAP\fP
311 .\"O Get screen mapping from kernel.
312 .\"O \fIargp\fP points to an area of size
313 .\"O E_TABSZ, which is loaded with the font positions used to display each
314 .\"O character.
315 .\"O This call is likely to return useless information if the
316 .\"O currently loaded font is more than 256 characters.
317 スクリーンマッピングをカーネルより取得する。\fIargp\fP はサイズ E_TABSZ の
318 領域を指す。その領域には各キャラクターを表示するのに用いられるフォントの
319 位置がロードされている。
320 この呼び出しは現在ロードされているフォントが 256 文字よりも多い時には
321 無意味な情報を返す事が多い。
322 .IP \fBGIO_UNISCRNMAP\fP
323 .\"O Get full Unicode screen mapping from kernel.
324 .\"O \fIargp\fP points to an
325 .\"O area of size E_TABSZ*sizeof(unsigned short), which is loaded with the
326 .\"O Unicodes each character represent.
327 .\"O A special set of Unicodes,
328 .\"O starting at U+F000, are used to represent "direct to font" mappings.
329 .\"O (Since 1.3.1.)
330 フル Unicode スクリーンマッピングをカーネルより取得する。
331 \fIargp\fP はサイズ E_TABSZ*sizeof(unsigned short) の領域を指す。
332 その領域には各キャラクターを示す Unicode がロードされている。
333 U+F000 に始まる Unicode の特別な集合は、「フォント直接な(direct to font)」
334 マッピングを示すのに用いられる(カーネル 1.3.1 以降)。
335 .IP \fBPIO_SCRNMAP\fP
336 .\"O Loads the "user definable" (fourth) table in the kernel which maps
337 .\"O bytes into console screen symbols.
338 .\"O \fIargp\fP points to an area of
339 .\"O size E_TABSZ.
340 「ユーザー定義可能な(user definable)」(4番目の)テーブルをカーネルに
341 ロードする。そのテーブルは各バイトをスクリーンシンボルにマッピングする。
342 \fIargp\fP はサイズE_TABSZの領域を指す。
343 .IP \fBPIO_UNISCRNMAP\fP
344 .\"O Loads the "user definable" (fourth) table in the kernel which maps
345 .\"O bytes into Unicodes, which are then translated into screen symbols
346 .\"O according to the currently loaded Unicode-to-font map.
347 .\"O Special Unicodes starting at U+F000 can be used to map directly to the font
348 .\"O symbols.
349 .\"O (Since 1.3.1.)
350 「ユーザー定義可能な」(4番目の)テーブルをカーネルにロードする。
351 そのテーブルは各バイトをユニコードにマッピングし、その後、
352 現在ロードされているユニコードからフォントへのマップに従い
353 スクリーンシンボルに変換される。
354 U+F000 に始まるユニコードは直接フォントシンボルにマッピングするのに
355 使える(カーネル 1.3.1 以降)
356 .IP \fBGIO_UNIMAP\fP
357 .\"O Get Unicode-to-font mapping from kernel.
358 .\"O \fIargp\fP points to a
359 Unicode からフォントへのマッピングをカーネルから取得する。
360 \fIargp\fP は、
361
362 .in +4n
363 .nf
364 struct unimapdesc {
365     unsigned short  entry_ct;
366     struct unipair *entries;
367 };
368 .fi
369 .in
370
371 という構造体を指す。
372 .\"O where \fIentries\fP points to an array of
373 ここで \fIentries\fP は、
374
375 .in +4n
376 .nf
377 struct unipair {
378     unsigned short unicode;
379     unsigned short fontpos;
380 };
381 .fi
382 .in
383
384 という構造体の配列へのポインターである。
385 .\"O (Since 1.1.92.)
386 (カーネル 1.1.92 以降)
387 .IP \fBPIO_UNIMAP\fP
388 .\"O Put unicode-to-font mapping in kernel.
389 .\"O \fIargp\fP points to a
390 .\"O \fIstruct unimapdesc\fP.
391 .\"O (Since 1.1.92)
392 Unicode からフォントへのマッピングをカーネルにセットする。\fIargp\fP
393 は構造体 \fIstruct unimapdesc\fP へのポインターである。(カーネル 1.1.92 以降)
394 .IP \fBPIO_UNIMAPCLR\fP
395 .\"O Clear table, possibly advise hash algorithm.
396 .\"O \fIargp\fP points to a
397 テーブルをクリアし、その事をハシュアルゴリズムに伝える。
398 \fIargp\fPは
399
400 .in +4n
401 .nf
402 struct unimapinit {
403     unsigned short advised_hashsize;  /* 0 if no opinion */
404     unsigned short advised_hashstep;  /* 0 if no opinion */
405     unsigned short advised_hashlevel; /* 0 if no opinion */
406 };
407 .fi
408 .in
409
410 という構造体を指すポインターである。
411 .\"O (Since 1.1.92.)
412 (カーネル 1.1.92 以降)
413 .IP \fBKDGKBMODE\fP
414 .\"O Gets current keyboard mode.
415 .\"O \fIargp\fP points to a \fIlong\fP which is set to one
416 .\"O of these:
417 現在のキーボードモードを取得する。\fIargp\fP の指す \fIlong\fP 型変数が、
418 次のうちのどれかに設定される。
419
420     K_RAW         0x00
421     K_XLATE       0x01
422     K_MEDIUMRAW   0x02
423     K_UNICODE     0x03
424 .IP \fBKDSKBMODE\fP
425 .\"O Sets current keyboard mode.
426 .\"O \fIargp\fP is a \fIlong\fP equal to one of the above values.
427 現在のキーボードモードを設定する。
428 \fIargp\fP は上記の値のうちのどれかに等しい \fIlong\fP にする。
429 .IP \fBKDGKBMETA\fP
430 .\"O Gets meta key handling mode.
431 .\"O \fIargp\fP points to a \fIlong\fP which is
432 .\"O set to one of these:
433 メタキーハンドリングモード(meta key handling mode)を取得する。
434 \fIargp\fP が指す \fIlong\fP 型変数は、次のうちのどれかに設定される。
435
436     K_METABIT     0x03   set high order bit
437     K_ESCPREFIX   0x04   escape prefix
438 .IP \fBKDSKBMETA\fP
439 .\"O Sets meta key handling mode.
440 .\"O \fIargp\fP is a \fIlong\fP equal to one of the above values.
441 メタキーハンドリングモードを設定する。
442 \fIargp\fP は上記の値のどれかに等しい \fIlong\fP にする。
443 .IP \fBKDGKBENT\fP
444 .\"O Gets one entry in key translation table (keycode to action code).
445 .\"O \fIargp\fP points to a
446 キーコードをアクションコードに変換するキー変換表のエントリーの一つを
447 取得する。
448 \fIargp\fP は、
449
450 .in +4n
451 .nf
452 struct kbentry {
453     unsigned char  kb_table;
454     unsigned char  kb_index;
455     unsigned short kb_value;
456 };
457 .fi
458 .in
459
460 へのポインターである。
461 .\"O with the first two members filled in:
462 .\"O \fIkb_table\fP selects the key table (0 <= \fIkb_table\fP < MAX_NR_KEYMAPS),
463 .\"O and \fIkb_index\fP is the keycode (0 <= \fIkb_index\fP < NR_KEYS).
464 .\"O \fIkb_value\fP is set to the corresponding action code,
465 .\"O or K_HOLE if there is no such key,
466 .\"O or K_NOSUCHMAP if \fIkb_table\fP is invalid.
467 最初の2つの要素、\fIkb_table\fP には選択するキーテーブル (0 <=
468 \fIkb_table\fP < MAX_NR_KEYMAPS)、\fIkb_index\fP にはキーコード(0 <=
469 \fIkb_index\fP < NR_KEYS)を設定する。
470 \fIkb_value\fP は対応するアクションコード、または、そのようなキーが
471 ないときには K_HOLE、\fIkb_table\fP が無効な時には K_NOSUCHMAP に設定される。
472 .IP \fBKDSKBENT\fP
473 .\"O Sets one entry in translation table.
474 .\"O \fIargp\fP points to
475 .\"O a \fIstruct kbentry\fP.
476 変換テーブルのエントリーの一つを設定する。\fIargp\fP は
477 構造体 \fIstruct kbentry\fP へのポインターである。
478 .IP \fBKDGKBSENT\fP
479 .\"O Gets one function key string.
480 .\"O \fIargp\fP points to a
481 ファンクションキーの文字列を取得する。\fIargp\fP は、
482
483 .in +4n
484 .nf
485 struct kbsentry {
486     unsigned char kb_func;
487     unsigned char kb_string[512];
488 };
489 .fi
490 .in
491
492 という構造体へのポインターである。
493
494 .\"O \fIkb_string\fP is set to the (null-terminated) string corresponding to
495 .\"O the \fIkb_func\fPth function key action code.
496 \fIkb_func\fP 番目のファンクションキーのアクションコードに対応する
497 (NULL で終端された)文字列が \fIkb_string\fP に設定される。
498 .IP \fBKDSKBSENT\fP
499 .\"O Sets one function key string entry.
500 .\"O \fIargp\fP points to
501 .\"O a \fIstruct kbsentry\fP.
502 ファンクションキーの文字列のエントリーを設定する。\fIargp\fP は、
503 構造体 \fIstruct kbsentry\fP へのポインターである。
504 .IP \fBKDGKBDIACR\fP
505 .\"O Read kernel accent table.
506 .\"O \fIargp\fP points to a
507 カーネルのアクセントテーブル(accent table)を読み込む。\fIargp\fPは、
508
509 .in +4n
510 .nf
511 struct kbdiacrs {
512     unsigned int   kb_cnt;
513     struct kbdiacr kbdiacr[256];
514 };
515 .fi
516 .in
517
518 という構造体へのポインターである。
519 .\"O where \fIkb_cnt\fP is the number of entries in the array, each of which
520 .\"O is a
521 ここで、\fIkb_cnt\fP は配列中のエントリーの個数で、個々のエントリーは、
522
523 .in +4n
524 .nf
525 struct kbdiacr {
526     unsigned char diacr;
527     unsigned char base;
528     unsigned char result;
529 };
530 .fi
531 .in
532
533 という構造体である。
534 .IP \fBKDGETKEYCODE\fP
535 .\"O Read kernel keycode table entry (scan code to keycode).
536 .\"O \fIargp\fP points to a
537 カーネルの(スキャンコードからキーコードへ
538 変換する)キーコードテーブルエントリーを読み込む。
539 \fIargp\fP は、
540
541 .in +4n
542 .nf
543 struct kbkeycode {
544     unsigned int scancode;
545     unsigned int keycode;
546 };
547 .fi
548 .in
549
550 へのポインターである。
551 .\"O \fIkeycode\fP is set to correspond to the given \fIscancode\fP.
552 .\"O (89 <= \fIscancode\fP <= 255 only.
553 .\"O For 1 <= \fIscancode\fP <= 88, \fIkeycode\fP==\fIscancode\fP.)
554 .\"O (Since 1.1.63.)
555 \fIkeycode\fP は、\fIscancode\fP に対応した値に設定される。(ただし、89
556 <= \fIscancode\fP <= 255 のみについて。1 <= \fIscancode\fP <= 88 では
557 \fIkeycode\fP == \fIscancode\fP である。)
558 (カーネル 1.1.63 以降)
559 .IP \fBKDSETKEYCODE\fP
560 .\"O Write kernel keycode table entry.
561 .\"O \fIargp\fP points to
562 .\"O a \fIstruct kbkeycode\fP.
563 .\"O (Since 1.1.63.)
564 カーネルのキーコードテーブルエントリーを書き込む。\fIargp\fP は構造体
565 \fIstruct kbkeycode\fP へのポインターである。
566 (カーネル 1.1.63 以降)
567 .IP \fBKDSIGACCEPT\fP
568 .\"O The calling process indicates its willingness to accept the signal
569 .\"O \fIargp\fP when it is generated by pressing an appropriate key combination.
570 .\"O (1 <= \fIargp\fP <= NSIG).
571 .\"O (See spawn_console() in linux/drivers/char/keyboard.c.)
572 この関数呼び出しは、特別な組合せでキーを押した時に発生するシグナル
573 \fIargp\fP (1 <= \fIargp\fP <= NSIG) を進んで受け付けるかどうかを示す。
574 (linux/drivers/char/keyboard.c の Spawn_console() を見よ。)
575 .IP \fBVT_OPENQRY\fP
576 .\"O Returns the first available (non-opened) console.
577 .\"O \fIargp\fP points to an \fIint\fP which is set to the
578 .\"O number of the vt (1 <= \fI*argp\fP <= MAX_NR_CONSOLES).
579 最初の空いている(まだオープンされていない)コンソールを返す。
580 \fIargp\fP の指す \fIint\fP 型の整数には、vt の番号がセットされる
581 (1 <= \fI*argp\fP <= MAX_NR_CONSOLES)。
582 .IP \fBVT_GETMODE\fP
583 .\"O Get mode of active vt.
584 .\"O \fIargp\fP points to a
585 アクティブな vt のモードを取得する。\fIargp\fPは、
586
587 .in +4n
588 .nf
589 struct vt_mode {
590    char mode;     /* vt mode */
591    char waitv;    /* if set, hang on writes if not active */
592    short relsig;  /* signal to raise on release req */
593    short acqsig;  /* signal to raise on acquisition */
594    short frsig;   /* unused (set to 0) */
595 };
596 .fi
597 .in
598
599 .\"O which is set to the mode of the active vt.
600 .\"O \fImode\fP is set to one of these values:
601 という構造体を指すポインタであり、アクティブな vt のモードが
602 セットされる。
603 \fImode\fP は次のどれかに設定される:
604
605 .\"O     VT_AUTO       auto vt switching
606 .\"O     VT_PROCESS    process controls switching
607 .\"O     VT_ACKACQ     acknowledge switch
608    VT_AUTO       自動vt切替え
609    VT_PROCESS    プロセスコントロール切替え
610    VT_ACKACQ     アクノリッジ切替え
611 .IP \fBVT_SETMODE\fP
612 .\"O Set mode of active vt.
613 .\"O \fIargp\fP points to
614 .\"O a \fIstruct vt_mode\fP.
615 アクティブな vt のモードを設定する。\fIargp\fP は構造体
616 \fIstruct vt_mode\fP への
617 ポインターである。
618 .IP \fBVT_GETSTATE\fP
619 .\"O Get global vt state info.
620 .\"O \fIargp\fP points to a
621 グローバルな vt の状態の情報を取得する。\fIargp\fPは、
622
623 .in +4n
624 .nf
625 struct vt_stat {
626    unsigned short v_active;  /* active vt */
627    unsigned short v_signal;  /* signal to send */
628    unsigned short v_state;   /* vt bit mask */
629 };
630 .fi
631 .in
632
633 へのポインターである。
634 .\"O For each vt in use, the corresponding bit in the \fIv_state\fP member is set.
635 .\"O (Kernels 1.0 through 1.1.92.)
636 使用されているそれぞれの vt につき \fIv_state\fP の対応するビットが
637 セットされる。
638 (カーネルl 1.0 から 1.1.92 まで)
639 .IP \fBVT_RELDISP\fP
640 .\"O Release a display.
641 ディスプレーを解放する。
642 .IP \fBVT_ACTIVATE\fP
643 .\"O Switch to vt \fIargp\fP (1 <= \fIargp\fP <= MAX_NR_CONSOLES).
644 \fIargp\fP (1 <= \fIargp\fP <= MAX_NR_CONSOLES)の vt に切替える。
645 .IP \fBVT_WAITACTIVE\fP
646 .\"O Wait until vt \fIargp\fP has been activated.
647 \fIargp\fPの vt がアクティブになるまで待つ。
648 .IP \fBVT_DISALLOCATE\fP
649 .\"O Deallocate the memory associated with vt \fIargp\fP.
650 .\"O (Since 1.1.54.)
651 \fIargp\fP の vt に結びつけられたメモリーを解放する。
652 (カーネル 1.1.54 以降)
653 .IP \fBVT_RESIZE\fP
654 .\"O Set the kernel's idea of screensize.
655 .\"O \fIargp\fP points to a
656 カーネルが認識するスクリーンサイズを設定する。\fIargp\fP は、
657
658 .in +4n
659 .nf
660 struct vt_sizes {
661    unsigned short v_rows;       /* # rows */
662    unsigned short v_cols;       /* # columns */
663    unsigned short v_scrollsize; /* no longer used */
664 };
665 .fi
666 .in
667
668 へのポインターである。
669 .\"O Note that this does not change the videomode.
670 .\"O See
671 .\"O .BR resizecons (8).
672 .\"O (Since 1.1.54.)
673 これはビデオモードを変更しない事に注意。
674 .BR resizecons (8)
675 を見よ(カーネル 1.1.54 以降)。
676 .IP \fBVT_RESIZEX\fP
677 .\"O Set the kernel's idea of various screen parameters.
678 .\"O \fIargp\fP points to a
679 カーネルが認識する各種のスクリーンパラメータを設定する。\fIargp\fP は、
680
681 .in +4n
682 .nf
683 struct vt_consize {
684     unsigned short v_rows;  /* number of rows */
685     unsigned short v_cols;  /* number of columns */
686     unsigned short v_vlin;  /* number of pixel rows
687                                on screen */
688     unsigned short v_clin;  /* number of pixel rows
689                                per character */
690     unsigned short v_vcol;  /* number of pixel columns
691                                on screen */
692     unsigned short v_ccol;  /* number of pixel columns
693                                per character */
694 };
695 .fi
696 .in
697
698 へのポインターである。
699
700 .\"O Any parameter may be set to zero, indicating "no change", but if
701 .\"O multiple parameters are set, they must be self-consistent.
702 .\"O Note that this does not change the videomode.
703 .\"O See
704 .\"O .BR resizecons (8).
705 .\"O (Since 1.3.3.)
706 パラメータはゼロであってもよい。そのときは「変更しないこと」を
707 意味するが、複数のパラメータが設定された時にはそれらの間で矛盾が
708 ないようにしなければならない。
709 この関数呼び出しによってもビデオモードは変更されない事に注意。
710 .BR resizecons (8)
711 を参照の事(カーネル 1.3.3 以降)。
712 .PP
713 .\"O The action of the following ioctls depends on the first byte in the struct
714 .\"O pointed to by \fIargp\fP, referred to here as the \fIsubcode\fP.
715 .\"O These are legal only for the superuser or the owner of the current tty.
716 以下の ioctl がどのように動作をするかは、\fIargp\fP が指す構造体の
717 最初のバイト(ここでは \fIsubcode\fP と呼ぶ)に依存する。
718 これらの呼出しは、スーパーユーザーか現在の tty のオーナにのみ許される。
719 .IP "\fBTIOCLINUX, subcode=0\fP"
720 .\"O Dump the screen.
721 .\"O Disappeared in 1.1.92.  (With kernel 1.1.92 or later, read from
722 .\"O /dev/vcsN or /dev/vcsaN instead.)
723 スクリーンをダンプ(dump)する
724 カーネル 1.1.92 以降でなくなった(1.1.92 以降では、代わりに /dev/vcsN
725 または /dev/vcsaN より読み込む)。
726 .IP "\fBTIOCLINUX, subcode=1\fP"
727 .\"O Get task information.
728 .\"O Disappeared in 1.1.92.
729 タスク情報を取得する。カーネル 1.1.92 でなくなった。
730 .IP "\fBTIOCLINUX, subcode=2\fP"
731 .\"O Set selection.
732 .\"O \fIargp\fP points to a
733 選択を設定する。
734 \fIargp\fP が指すのは、
735 .in +4n
736 .nf
737
738 struct {
739    char subcode;
740    short xs, ys, xe, ye;
741    short sel_mode;
742 }
743
744 .fi
745 .in
746 .\"O \fIxs\fP and \fIys\fP are the starting column and row.
747 .\"O \fIxe\fP and \fIye\fP are the ending
748 .\"O column and row.
749 .\"O (Upper left corner is row=column=1.)
750 .\"O \fIsel_mode\fP is 0 for character-by-character selection,
751 .\"O 1 for word-by-word selection,
752 .\"O or 2 for line-by-line selection.
753 .\"O The indicated screen characters are highlighted and saved
754 .\"O in the static array sel_buffer in devices/char/console.c.
755 であり、ここで
756 \fIxs\fP と \fIys\fP は始めの桁と行で、\fIxe\fP と \fIye\fP は終りの桁と
757 行である。
758 (左上の隅が 桁=行=1 )
759 \fIsel_mode\fP は 0 が文字毎の選択で、1は語毎の選択、2は行毎の選択を
760 意味する。
761 示されたスクリーン上の文字はハイライト表示され devices/char/console.c の
762 静的配列 sel_buffer に保存される。
763 .IP "\fBTIOCLINUX, subcode=3\fP"
764 .\"O Paste selection.
765 .\"O The characters in the selection buffer are
766 .\"O written to \fIfd\fP.
767 選択したものをペーストする。
768 選択バッファ中の文字 が \fIfd\fP に書き出される。
769 .IP "\fBTIOCLINUX, subcode=4\fP"
770 .\"O Unblank the screen.
771 スクリーンをアンブランク(unblank)する。
772 .IP "\fBTIOCLINUX, subcode=5\fP"
773 .\"O Sets contents of a 256-bit look up table defining characters in a "word",
774 .\"O for word-by-word selection.
775 .\"O (Since 1.1.32.)
776 語毎の選択のための「語」中の文字を規定している 256 ビットのルックアップ
777 テーブルの内容を設定する(カーネル 1.1.32 以降)。
778 .IP "\fBTIOCLINUX, subcode=6\fP"
779 .\"O \fIargp\fP points to a char which is set to the value of the kernel
780 .\"O variable \fIshift_state\fP.
781 .\"O (Since 1.1.32.)
782 \fIargp\fP は文字変数を指すポインタで、その内容がカーネル変数
783 \fIshift_state\fPの値に設定される(カーネル 1.1.32 以降)。
784 .IP "\fBTIOCLINUX, subcode=7\fP"
785 .\"O \fIargp\fP points to a char which is set to the value of the kernel
786 .\"O variable \fIreport_mouse\fP.
787 .\"O (Since 1.1.33.)
788 \fIargp\fP は文字変数を指すポインタで、その内容がカーネル変数
789 \fIreport_mouse\fP の値に設定される(カーネル 1.1.33 以降)。
790 .IP "\fBTIOCLINUX, subcode=8\fP"
791 .\"O Dump screen width and height, cursor position, and all the
792 .\"O character-attribute pairs.
793 .\"O (Kernels 1.1.67 through 1.1.91 only.
794 .\"O With kernel 1.1.92 or later, read from /dev/vcsa* instead.)
795 スクリーン幅、スクリーン高さ、カーソル位置、全ての文字属性の組をダンプする
796 (カーネル 1.1.67 から 1.1.91までのみ。
797 カーネル 1.1.92 以降では /dev/vcsa*より読み込む)。
798 .IP "\fBTIOCLINUX, subcode=9\fP"
799 .\"O Restore screen width and height, cursor position, and all the
800 .\"O character-attribute pairs.
801 .\"O (Kernels 1.1.67 through 1.1.91 only.
802 .\"O With kernel 1.1.92 or later, write to /dev/vcsa* instead.)
803 スクリーン幅、スクリーン高さ、カーソル位置、全ての文字属性の組を復元する
804 (カーネル 1.1.67 から 1.1.91 までのみ。
805 カーネル 1.1.92 以降では /dev/vcsa* に書き込む)。
806 .IP "\fBTIOCLINUX, subcode=10\fP"
807 .\"O Handles the Power Saving
808 .\"O feature of the new generation of monitors.
809 .\"O VESA screen blanking mode is set to \fIargp\fP[1], which governs what
810 .\"O screen blanking does:
811 新世代モニターのパワーセーブ機能を制御する。
812 VESA スクリーンブランキングモードが \fIargp\fP[1]に設定される。
813 その値はスクリーンブランキングがどのように行われるかを示す。以下がその
814 値である。
815
816 .\"O     \fI0\fP: Screen blanking is disabled.
817         \fI0\fP: スクリーンブランキングなし。
818
819 .\"O     \fI1\fP: The current video adapter
820 .\"O register settings are saved, then the controller is programmed to turn off
821 .\"O the vertical synchronization pulses.
822 .\"O This puts the monitor into "standby" mode.
823 .\"O If your monitor has an Off_Mode timer, then
824 .\"O it will eventually power down by itself.
825         \fI1\fP:現在のビデオアダプターレジスタが保存されたあと、
826 コントローラは垂直同期パルスをオフにするようプログラムされる。これにより
827 モニターは「スタンバイ」モードにはいる。
828 モニターに Off_Mode タイマが備わっておれば、最終的にはモニターが自分で
829 電源を落す。
830
831 .\"O     \fI2\fP: The current
832 .\"O settings are saved, then both the vertical and horizontal
833 .\"O synchronization pulses are turned off.
834 .\"O This puts the monitor into "off" mode.
835 .\"O If your monitor has no Off_Mode timer,
836 .\"O or if you want your monitor to power down immediately when the
837 .\"O blank_timer times out, then you choose this option.
838 .\"O (\fICaution:\fP Powering down frequently will damage the monitor.)
839         \fI2\fP:現在の設定を保存した後、垂直、水平同期パルスがオフになる。
840 これによりモニターは「オフ」モードになる。
841 モニターに Off_Mode タイマーがない時、または、blank_timer がタイムアウトしたら
842 すぐにモニターの電源を落したいときにこの選択肢を選ぶ。
843 (注意:頻繁にモニターの電源を切るとモニターを痛める。)
844
845 .\"O (Since 1.1.76.)
846 (カーネル 1.1.76 以降)
847
848 .\"O .SH "RETURN VALUE"
849 .SH 戻り値
850 .\"O On success, 0 is returned.
851 .\"O On error \-1 is returned, and \fIerrno\fP is set.
852 成功時には 0 が返される。エラーに対しては \-1 が返され、
853 \fIerrno\fP が設定される。
854 .\"O .SH ERRORS
855 .SH エラー
856 .\"O \fIerrno\fP may take on these values:
857 \fIerrno\fP は次のような値をとる:
858 .TP
859 .B EBADF
860 .\"O The file descriptor is invalid.
861 ファイルディスクリプタが無効。
862 .TP
863 .B ENOTTY
864 .\"O The file descriptor is not associated with a character special device,
865 .\"O or the specified request does not apply to it.
866 ファイルディスクリプタがキャラクタ・スペシャルデバイスと関連付けられて
867 いない。または、要求されたものがそれに当てはまらない。
868 .TP
869 .B EINVAL
870 .\"O The file descriptor or \fIargp\fP is invalid.
871 ファイルディスクリプタまたは \fIargp\fP が無効。
872 .TP
873 .B EPERM
874 .\"O Insufficient permission.
875 権限が不十分。
876
877 .\"O .SH NOTES
878 .SH 注意
879 .\"O .BR Warning :
880 .\"O Do not regard this man page as documentation of the Linux console ioctl's.
881 .\"O This is provided for the curious only, as an alternative to reading the
882 .\"O source.
883 .\"O Ioctl's are undocumented Linux internals, liable to be changed
884 .\"O without warning.
885 .\"O (And indeed, this page more or less describes the
886 .\"O situation as of kernel version 1.1.94;
887 .\"O there are many minor and not-so-minor
888 .\"O differences with earlier versions.)
889 .BR 警告 :
890 このマニュアルページを Linux のコンソール ioctl を文書化したものと思わない事。
891 これは、興味がある人がソースを読むことの代わりになるように用意した物である。
892 ioctl は文書化されない Linux の内部機能であって、警告なしに
893 変更されることがある。
894 (そして、このページはカーネル 1.1.94 のときの状況を記述した物で、それは
895 以前のバージョンと比べれば、多くの違いがある)
896
897 .\"O Very often, ioctl's are introduced for communication between the
898 .\"O kernel and one particular well-known program (fdisk, hdparm, setserial,
899 .\"O tunelp, loadkeys, selection, setfont, etc.), and their behavior will be
900 .\"O changed when required by this particular program.
901 ioctl はカーネルと、ある特定のよく知られたプログラムとの情報交換のために
902 導入される事が非常に多い(fdisk, hdparm, setserial,tunelp, loadkeys,
903 selection, setfont など)。そのため ioctl の動作は、その特定のプログラムが
904 必要とした時には変更になる。
905
906 .\"O Programs using these ioctl's will not be portable to other versions
907 .\"O of UNIX, will not work on older versions of Linux, and will not work
908 .\"O on future versions of Linux.
909 これらの ioctl を使ったプログラムは他のバージョンの UNIX との互換性が
910 ないし、古いバージョンの Linux では、走らない。さらに将来のバージョンの
911 Linux では走らなくなるかも知れない。
912
913 .\"O Use POSIX functions.
914 POSIX 機能を使いなさい。
915 .\"O .SH "SEE ALSO"
916 .SH 関連項目
917 .BR dumpkeys (1),
918 .BR kbd_mode (1),
919 .BR loadkeys (1),
920 .BR mknod (1),
921 .BR setleds (1),
922 .BR setmetamode (1),
923 .BR execve (2),
924 .BR fcntl (2),
925 .BR ioperm (2),
926 .BR termios (3),
927 .BR console (4),
928 .BR console_codes (4),
929 .BR mt (4),
930 .BR sd (4),
931 .BR tty (4),
932 .BR tty_ioctl (4),
933 .BR ttyS (4),
934 .BR vcs (4),
935 .BR vcsa (4),
936 .BR charsets (7),
937 .BR mapscrn (8),
938 .BR resizecons (8),
939 .BR setfont (8),
940 .IR /usr/include/linux/kd.h ,
941 .I /usr/include/linux/vt.h