1 .\" Copyright (c) 1995 Jim Van Zandt <jrv@vanzandt.mv.com> and aeb
2 .\" Sun Feb 26 11:46:23 MET 1995
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.
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.
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.
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,
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)
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)
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>
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>
51 .TH CONSOLE_IOCTL 4 2009-02-28 "Linux" "Linux Programmer's Manual"
54 .\"O console_ioctl \- ioctl's for console terminal and virtual consoles
55 console_ioctl \- コンソール端末と仮想コンソールの ioctl
58 .\"O The following Linux-specific
60 .\"O requests are supported.
61 .\"O Each requires a third argument, assumed here to be \fIargp\fP.
65 それぞれ3番目の引数が必要である、ここでは \fIargp\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:
72 \fIargp\fP は \fIchar\fP のポインターである。
73 \fI*argp\fP の下位 3 ビットに以下のように LED の状態がセットされる。
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 スクロールロックが点灯
83 .\"O The LEDs are set to correspond to the lower three bits of
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 は
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
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 はキーボードフラグにアクセスするのに用いられる。
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.
111 キャピタルロック、ナンバーロック、スクロールロックの(LED の表示では
113 \fIargp\fP はフラグの状態がセットされる文字変数を指す。
114 (0x7)でマスクして得られる下位 3 ビットが現在のフラグの状態を示し、
115 (0x70)でマスクして得られる次の 3 ビットがデフォルトのフラグの状態を
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.
124 キャピタルロック、ナンバーロック、スクロールロックの(LED の表示ではなく)
126 \fIargp\fP がセットしたいフラグである。
127 (0x7)でマスクして得られる下位 3 ビットがフラグの状態で、(0x70)でマスクして
128 得られる次の 3 ビットがデフォルトのフラグの状態である。(カーネル
131 .\"O Get keyboard type.
132 .\"O This returns the value KB_101, defined as 0x02.
133 キーボードの種類を得る。これは値 0x02 と定義されている KB_101を返す。
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 と等価である。
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 と等価である。
143 .\"O Enable I/O to video board.
144 .\"O Equivalent to \fIioperm(0x3b4, 0x3df-0x3b4+1, 1)\fP.
146 これは \fIioperm(0x3b4, 0x3df-0x3b4+1, 1)\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 と等価である。
153 .\"O Set text/graphics mode.
154 .\"O \fIargp\fP is one of these:
156 \fIargp\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.
165 \fIargp\fP が指す \fIlong\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.)
177 \fIargp\fP の下位 16 ビットはクロックサイクルを単位にして周期を指定し、
178 上位 16 ビットが msec の単位で表した、(トーンを発生させる)時間を指定する。
179 トーンを発生させる時間がゼロのときは、サウンドはオフになる。
181 例えば、\fIargp\fP = (125<<16) + 0x637 とすれば、通常 ctrl-G を押した時に
183 (カーネル 0.99pl1 以降;この機能は カーネル 2.1.49 から
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.
193 \fIargp\fP の下位 16 ビットはクロックサイクルを単位として周期を示す。
194 (つまり \fIargp\fP = 1193180/周波数)。
195 \fIargp\fP = 0 の場合、サウンドはオフになる。
198 .\"O Get the current default color map from kernel.
199 .\"O \fIargp\fP points to
200 .\"O a 48-byte array.
202 現在のデフォルトのカラーマップをカーネルより取得する。
203 .\"O \fIargp\fP は 48 バイトの配列へのポインター。(カーネル 1.3.3 以降)
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
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.
215 デフォルトのテキストモードのカラーマップを変更する。
216 \fIargp\fP が指す 48 バイトの配列中には、16 の可能なスクリーンの色を、
217 赤、緑、青の順に 0 をオフ、255を最大強度とした値として納める。
218 デフォルトの色は順に、黒、濃い赤、濃い緑、茶、濃い青、濃い紫、濃いシアン、
219 明るい灰色、濃い灰色、明るい赤、明るい緑、黄、明るい青、明るい紫、
220 明るいシアン、白である。(カーネル 1.3.3以降)
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 のエラーコードを返す。
232 .\"O Gets screen font and associated information.
233 .\"O \fIargp\fP points to a
234 .\"O struct consolefontdesc (see \fBPIO_FONTX\fP).
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.
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 以降)。
255 .\"O Sets 256-character screen font.
256 .\"O Load font into the EGA/VGA character
258 .\"O \fIargp\fP points to a 8192 byte map, with 32 bytes per
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 のマッピングが無効になる。
270 .\"O Sets screen font and associated rendering information.
273 スクリーンフォントと、それに関連するレンダリング情報をセットする。
274 \fIargp\fP は、以下の構造体を指す。
278 struct consolefontdesc {
279 .\"O unsigned short charcount; /* characters in font
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; /* フォントの文字数
287 unsigned short charheight; /* 一文字の走査線の数
289 char *chardata; /* 展開されたフォントデータ */
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.
298 必要ならスクリーンは適当にサイズ変更され、\fBSIGWINCH\fP が適切な
300 このコールにより Unicode のマッピングが無効になる。
301 .IP \fBPIO_FONTRESET\fP
302 .\"O Resets the screen font, size and Unicode mapping to the bootup
304 .\"O \fIargp\fP is unused, but should be set to NULL to
305 .\"O ensure compatibility with future versions of Linux.
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
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 領域を指す。その領域には各キャラクターを表示するのに用いられるフォントの
320 この呼び出しは現在ロードされているフォントが 256 文字よりも多い時には
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.
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
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
350 「ユーザー定義可能な」(4番目の)テーブルをカーネルにロードする。
351 そのテーブルは各バイトをユニコードにマッピングし、その後、
352 現在ロードされているユニコードからフォントへのマップに従い
354 U+F000 に始まるユニコードは直接フォントシンボルにマッピングするのに
357 .\"O Get Unicode-to-font mapping from kernel.
358 .\"O \fIargp\fP points to a
359 Unicode からフォントへのマッピングをカーネルから取得する。
365 unsigned short entry_ct;
366 struct unipair *entries;
372 .\"O where \fIentries\fP points to an array of
378 unsigned short unicode;
379 unsigned short fontpos;
388 .\"O Put unicode-to-font mapping in kernel.
389 .\"O \fIargp\fP points to a
390 .\"O \fIstruct unimapdesc\fP.
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 テーブルをクリアし、その事をハシュアルゴリズムに伝える。
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 */
414 .\"O Gets current keyboard mode.
415 .\"O \fIargp\fP points to a \fIlong\fP which is set to one
417 現在のキーボードモードを取得する。\fIargp\fP の指す \fIlong\fP 型変数が、
425 .\"O Sets current keyboard mode.
426 .\"O \fIargp\fP is a \fIlong\fP equal to one of the above values.
428 \fIargp\fP は上記の値のうちのどれかに等しい \fIlong\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 型変数は、次のうちのどれかに設定される。
436 K_METABIT 0x03 set high order bit
437 K_ESCPREFIX 0x04 escape prefix
439 .\"O Sets meta key handling mode.
440 .\"O \fIargp\fP is a \fIlong\fP equal to one of the above values.
442 \fIargp\fP は上記の値のどれかに等しい \fIlong\fP にする。
444 .\"O Gets one entry in key translation table (keycode to action code).
445 .\"O \fIargp\fP points to a
446 キーコードをアクションコードに変換するキー変換表のエントリーの一つを
453 unsigned char kb_table;
454 unsigned char kb_index;
455 unsigned short kb_value;
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 に設定される。
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 へのポインターである。
479 .\"O Gets one function key string.
480 .\"O \fIargp\fP points to a
481 ファンクションキーの文字列を取得する。\fIargp\fP は、
486 unsigned char kb_func;
487 unsigned char kb_string[512];
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 に設定される。
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 へのポインターである。
505 .\"O Read kernel accent table.
506 .\"O \fIargp\fP points to a
507 カーネルのアクセントテーブル(accent table)を読み込む。\fIargp\fPは、
513 struct kbdiacr kbdiacr[256];
519 .\"O where \fIkb_cnt\fP is the number of entries in the array, each of which
521 ここで、\fIkb_cnt\fP は配列中のエントリーの個数で、個々のエントリーは、
528 unsigned char result;
534 .IP \fBKDGETKEYCODE\fP
535 .\"O Read kernel keycode table entry (scan code to keycode).
536 .\"O \fIargp\fP points to a
537 カーネルの(スキャンコードからキーコードへ
538 変換する)キーコードテーブルエントリーを読み込む。
544 unsigned int scancode;
545 unsigned int keycode;
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.)
555 \fIkeycode\fP は、\fIscancode\fP に対応した値に設定される。(ただし、89
556 <= \fIscancode\fP <= 255 のみについて。1 <= \fIscancode\fP <= 88 では
557 \fIkeycode\fP == \fIscancode\fP である。)
559 .IP \fBKDSETKEYCODE\fP
560 .\"O Write kernel keycode table entry.
561 .\"O \fIargp\fP points to
562 .\"O a \fIstruct kbkeycode\fP.
564 カーネルのキーコードテーブルエントリーを書き込む。\fIargp\fP は構造体
565 \fIstruct kbkeycode\fP へのポインターである。
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() を見よ。)
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)。
583 .\"O Get mode of active vt.
584 .\"O \fIargp\fP points to a
585 アクティブな vt のモードを取得する。\fIargp\fPは、
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) */
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 のモードが
603 \fImode\fP は次のどれかに設定される:
605 .\"O VT_AUTO auto vt switching
606 .\"O VT_PROCESS process controls switching
607 .\"O VT_ACKACQ acknowledge switch
609 VT_PROCESS プロセスコントロール切替え
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 への
618 .IP \fBVT_GETSTATE\fP
619 .\"O Get global vt state info.
620 .\"O \fIargp\fP points to a
621 グローバルな vt の状態の情報を取得する。\fIargp\fPは、
626 unsigned short v_active; /* active vt */
627 unsigned short v_signal; /* signal to send */
628 unsigned short v_state; /* vt bit mask */
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 の対応するビットが
638 (カーネルl 1.0 から 1.1.92 まで)
640 .\"O Release a display.
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.
651 \fIargp\fP の vt に結びつけられたメモリーを解放する。
654 .\"O Set the kernel's idea of screensize.
655 .\"O \fIargp\fP points to a
656 カーネルが認識するスクリーンサイズを設定する。\fIargp\fP は、
661 unsigned short v_rows; /* # rows */
662 unsigned short v_cols; /* # columns */
663 unsigned short v_scrollsize; /* no longer used */
669 .\"O Note that this does not change the videomode.
671 .\"O .BR resizecons (8).
677 .\"O Set the kernel's idea of various screen parameters.
678 .\"O \fIargp\fP points to a
679 カーネルが認識する各種のスクリーンパラメータを設定する。\fIargp\fP は、
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
688 unsigned short v_clin; /* number of pixel rows
690 unsigned short v_vcol; /* number of pixel columns
692 unsigned short v_ccol; /* number of pixel columns
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.
704 .\"O .BR resizecons (8).
706 パラメータはゼロであってもよい。そのときは「変更しないこと」を
707 意味するが、複数のパラメータが設定された時にはそれらの間で矛盾が
709 この関数呼び出しによってもビデオモードは変更されない事に注意。
711 を参照の事(カーネル 1.3.3 以降)。
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.)
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"
732 .\"O \fIargp\fP points to a
740 short xs, ys, xe, ye;
746 .\"O \fIxs\fP and \fIys\fP are the starting column and row.
747 .\"O \fIxe\fP and \fIye\fP are the ending
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.
756 \fIxs\fP と \fIys\fP は始めの桁と行で、\fIxe\fP と \fIye\fP は終りの桁と
759 \fIsel_mode\fP は 0 が文字毎の選択で、1は語毎の選択、2は行毎の選択を
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.
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.
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.
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.
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 その値はスクリーンブランキングがどのように行われるかを示す。以下がその
816 .\"O \fI0\fP: Screen blanking is disabled.
817 \fI0\fP: スクリーンブランキングなし。
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 コントローラは垂直同期パルスをオフにするようプログラムされる。これにより
828 モニターに Off_Mode タイマが備わっておれば、最終的にはモニターが自分で
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 (注意:頻繁にモニターの電源を切るとモニターを痛める。)
848 .\"O .SH "RETURN VALUE"
850 .\"O On success, 0 is returned.
851 .\"O On error \-1 is returned, and \fIerrno\fP is set.
852 成功時には 0 が返される。エラーに対しては \-1 が返され、
856 .\"O \fIerrno\fP may take on these values:
857 \fIerrno\fP は次のような値をとる:
860 .\"O The file descriptor is invalid.
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 いない。または、要求されたものがそれに当てはまらない。
870 .\"O The file descriptor or \fIargp\fP is invalid.
871 ファイルディスクリプタまたは \fIargp\fP が無効。
874 .\"O Insufficient permission.
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
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.)
890 このマニュアルページを Linux のコンソール ioctl を文書化したものと思わない事。
891 これは、興味がある人がソースを読むことの代わりになるように用意した物である。
892 ioctl は文書化されない Linux の内部機能であって、警告なしに
894 (そして、このページはカーネル 1.1.94 のときの状況を記述した物で、それは
895 以前のバージョンと比べれば、多くの違いがある)
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 の動作は、その特定のプログラムが
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 では走らなくなるかも知れない。
913 .\"O Use POSIX functions.
928 .BR console_codes (4),
940 .IR /usr/include/linux/kd.h ,
941 .I /usr/include/linux/vt.h