console_ioctl

CONSOLE_IOCTL(4)           Linux Programmer's Manual          CONSOLE_IOCTL(4)



åå
       console_ioctl - ã³ã³ã½ã¼ã«ç«¯æ«ã¨ä»®æ³ã³ã³ã½ã¼ã«ã® ioctl

説æ
       次ã®ãã㪠Linux åºæã® ioctl(2)  ããµãã¼ãããã¦ããã
       ãããã3çªç®ã®å¼æ°ãå¿è¦ã§ãããããã§ã¯ argp ã¨ããã

       KDGETLED
              LED ã®ç¶æãåå¾ããã argp 㯠char ã®ãã¤ã³ã¿ã¼ã§ããã *argp ã®ä¸ä½ 3
              ãããã«ä»¥ä¸ã®ããã« LED ã®ç¶æãã»ãããããã

              LED_CAP    0x04   ãã£ãã¿ã«ãã㯠LED ç¹ç¯
              LED_NUM    0x02   ãã³ãã¼ãã㯠LED ç¹ç¯
              LED_SCR    0x01   ã¹ã¯ãã¼ã«ãã㯠LED ç¹ç¯

       KDSETLED
              LEDãç¹ç¯ããããLED㯠argp ã®ä¸ä½ 3 ãããã«å¾ãç¹ç¯ãããã
              ããããããé«ä½ã®ããããã»ããããã¦ããæã«ã¯ããã£ãã¿ã«ããã¯ã ãã³ãã¼ããã¯ãã¹ã¯ã‐
              ã¼ã«ããã¯ã®ãã¼ãã¼ãæ©è½ã®ç¶æã表示ãã LED 㯠é常ç¶æã«æ»ãã

       ã«ã¼ãã« 1.1.54 以åã¯ãLED ã¯ããããã®ã‐
       ã¼ãã¼ããã©ã°ã®ç¶æãåæ ããã ãã§ãKDGETLED/KDSETLED ãã‐
       ã¼ãã¼ããã©ã°ãå¤æ´ããã ãã§ãã£ãã ã«ã¼ãã« 1.1.54 ãã㯠LED
       ã«ä»»æã®è¡¨ç¤ºããããã¨ãã§ããããã«ãªã£ããã ããã©ã«ãã§ã¯ãã¼ãã¼ããã©ã°ã表示ããã
       次ã«ç¤ºã 2 ã¤ã® ioctl ã¯ãã¼ãã¼ããã©ã°ã«ã¢ã¯ã»ã¹ããã®ã«ç¨ããããã

       KDGKBLED
              ãã£ãã¿ã«ããã¯ããã³ãã¼ããã¯ãã¹ã¯ãã¼ã«ããã¯ã®(LED ã®è¡¨ç¤ºã§ã¯ ãªã)ã‐
              ã¼ãã¼ããã©ã°ãå¾ãã argp ã¯ãã©ã°ã®ç¶æãã»ãããããæåå¤æ°ãæãã
              (0x7)ã§ãã¹ã¯ãã¦å¾ãããä¸ä½ 3 ããããç¾å¨ã®ãã©ã°ã®ç¶æã示ãã
              (0x70)ã§ãã¹ã¯ãã¦å¾ããã次㮠3 ããããããã©ã«ãã®ãã©ã°ã®ç¶æã
              示ãã(ã«ã¼ãã« 1.1.54以é)

       KDSKBLED
              ãã£ãã¿ã«ããã¯ããã³ãã¼ããã¯ãã¹ã¯ãã¼ã«ããã¯ã®(LED ã®è¡¨ç¤ºã§ã¯ãªã)  ã‐
              ã¼ãã¼ããã©ã°ãã»ããããã argp ãã»ããããããã©ã°ã§ããã
              (0x7)ã§ãã¹ã¯ãã¦å¾ãããä¸ä½ 3 ãããããã©ã°ã®ç¶æã§ã(0x70)ã§ãã¹ã¯ãã¦
              å¾ããã次㮠3 ããããããã©ã«ãã®ãã©ã°ã®ç¶æã§ããã(ã«ã¼ãã« 1.1.54以é)

       KDGKBTYPE
              ãã¼ãã¼ãã®ç¨®é¡ãå¾ããããã¯å¤ 0x02 ã¨å®ç¾©ããã¦ãã KB_101ãè¿ãã

       KDADDIO
              I/Oãã¼ããæå¹ãªç©ã¨ãã¦å ããããã㯠ioperm(arg,1,1) ã¨ç価ã§ããã

       KDDELIO
              I/Oãã¼ããæå¹ãªç©ããå¤ãããã㯠ioperm(arg,1,0) ã¨ç価ã§ããã

       KDENABIO
              ãããªãã¼ãã¸ã® I/O ãå¯è½ã«ããã ãã㯠ioperm(0x3b4, 0x3df-0x3b4+1, 1)
              ã¨ç価ã§ããã

       KDDISABIO
              ãããªãã¼ãã¸ã® I/O ãä¸å¯è½ã«ããã ãã㯠ioperm(0x3b4, 0x3df-0x3b4+1,
              0) ã¨ç価ã§ããã

       KDSETMODE
              ããã¹ã/ã°ã©ãã£ã¯ã¹ã¢ã¼ããè¨å®ããã argp ã¯æ¬¡ã®ãã¡ã®ã©ããï¼


              KD_TEXT       0x00

              KD_GRAPHICS   0x01

       KDGETMODE
              ããã¹ã/ã°ã©ãã£ã¯ã¹ã¢ã¼ããåå¾ããã argp ãæã long åå¤æ°ã«
              ä¸è¿°ã®å¤ã®ã©ã¡ãããã»ãããããã

       KDMKTONE
              æå®ãããé·ãã®ãã¼ã³ãçºçããã argp ã®ä¸ä½ 16 ãããã¯ã¯ã‐
              ãã¯ãµã¤ã¯ã«ãåä½ã«ãã¦å¨æãæå®ãã ä¸ä½ 16 ãããã msec
              ã®åä½ã§è¡¨ããã(ãã¼ã³ãçºçããã)æéãæå®ããã ãã¼ã³ãçºçãããæéãã¼ã‐
              ã®ã¨ãã¯ããµã¦ã³ãã¯ãªãã«ãªãã å¶å¾¡ã¯ç´ã¡ã«æ»ãã ä¾ãã°ãargp =
              (125<<16) + 0x637 ã¨ããã°ãé常 ctrl-G ãæ¼ããæã« çºçããé³ã«ãªãã
              (ã«ã¼ãã« 0.99pl1 以é;ãã®æ©è½ã¯ ã«ã¼ãã« 2.1.49 ãã 2.1.50
              ã§ã¯ãã°ã®ããåä½ããªã)

       KIOCSOUND
              é³ã®çºçã®éå§ãåæ¢ãè¡ãã argp ã®ä¸ä½ 16 ãããã¯ã¯ã‐
              ãã¯ãµã¤ã¯ã«ãåä½ã¨ãã¦å¨æã示ãã (ã¤ã¾ã argp = 1193180/å¨æ³¢æ°)ã
              argp = 0 ã®å ´åããµã¦ã³ãã¯ãªãã«ãªãã
              ã©ã¡ãã®å ´åã§ãããã ã¡ã«å¶å¾¡ã¯æ»ãã

       GIO_CMAP
              ç¾å¨ã®ããã©ã«ãã®ã«ã©ã¼ããããã«ã¼ãã«ããåå¾ããã

       PIO_CMAP
              ããã©ã«ãã®ããã¹ãã¢ã¼ãã®ã«ã©ã¼ããããå¤æ´ããã argp ãæã 48 ãã¤ãã®éåä¸‐
              ã«ã¯ã16 ã®å¯è½ãªã¹ã¯ãªã¼ã³ã®è²ãã 赤ãç·ãéã®é ã« 0
              ããªãã255ãæ大強度ã¨ããå¤ã¨ãã¦ç´ããã
              ããã©ã«ãã®è²ã¯é ã«ãé»ãæ¿ã赤ãæ¿ãç·ãè¶ãæ¿ãéãæ¿ãç´«ãæ¿ãã·ã¢ã³ã
              æããç°è²ãæ¿ãç°è²ãæãã赤ãæããç·ãé»ãæããéãæããç´«ã
              æããã·ã¢ã³ãç½ã§ããã(ã«ã¼ãã« 1.3.3以é)

       GIO_FONT
              æ¡å¼µãããå½¢å¼ã§ 256 æåã®ã¹ã¯ãªã¼ã³ãã©ã³ããå¾ãã argp 㯠8192
              ãã¤ãã®éåãæãã ç¾å¨ãã¼ãããã¦ãããã©ã³ãã 512 æå‐
              ã®ãã©ã³ãã§ããããã³ã³ã½ã¼ã«ã ããã¹ãã¢ã¼ãã§ãªãæã«ã¯å¤±æã EINVAL
              ã®ã¨ã©ã¼ã³ã¼ããè¿ãã

       GIO_FONTX
              ã¹ã¯ãªã¼ã³ãã©ã³ãã¨ããã«é¢é£ããæå ±ãåå¾ããã argp ã¯æ§é ä½
              consolefontdesc (PIO_FONTX ãåç§ã®ãã¨)ãæãã
              é¢æ°å¼ã³åºãã®ã¨ãã«ã¯ãcharcount ã«ã¯ãchardata ãæã
              ãããã¡ã¼ã«ããã¾ãæ大ã®æåæ°ãã»ããããªããã°ãªããªãã
              é¢æ°å¼ã³åºãããæ»ã£ãæã«ã¯ charcount 㨠charheight ã«ã¯ã ç¾å¨ã‐
              ã¼ãããã¦ãããã©ã³ãã®è©²å½ãããã¼ã¿ãåãããã¦ããã éå chardata ã«ã¯ãæåã«
              charcount ã«ãããå¤ã«ãã£ã¦
              ãã©ã³ããåããã®ã«ååãªã¹ãã¼ã¹ãããã¨ãããã°ãã©ã³ããã¼ã¿ãåããããã
              ããã§ãªãæã«ã¯ããããã¡ã¼ã¯å¤æ´ãããã errno ã« ENOMEM ã ã»ããããã(ã«ã¼ãã«
              1.3.1 以é)ã

       PIO_FONT
              256 æåã®ãã©ã³ããã»ãããããEGA/VGA ãã£ã©ã¯ã¿ã¼ã¸ã§ãã¬ã¼ã¿ã¼
              (character generator) ã«ãã©ã³ãããã¼ãããã argp ã¯ã8192 ãã¤ã(ä¸æå 32
              ãã¤ã)ã®ããããæãã ãããã®ãã¡ãæåã® N ã®ã¿ã 8xN ã®ãã©ã³ãã®ããã« ç¨ãããã(0
              < N <= 32)ã ãã®å¼ã³åºãããã㨠Unicode ã®ãããã³ã°ãç¡å¹ã«ãªãã

       PIO_FONTX
              ã¹ã¯ãªã¼ã³ãã©ã³ãã¨ãããã«é¢é£ããã¬ã³ããªã³ã°æå ±ãã»ããããã argp
              ã¯ã以ä¸ã®æ§é ä½ãæãã

                  struct consolefontdesc {
                      unsigned short charcount;  /* ãã©ã³ãã®æåæ°
                                                    (256 ã¾ã㯠512) */
                      unsigned short charheight; /* ä¸æåã®èµ°æ»ç·ã®æ°
                                                    (1-32) */
                      char          *chardata;   /* å±éããããã©ã³ããã¼ã¿ */
                  };

              å¿è¦ãªãã¹ã¯ãªã¼ã³ã¯é©å½ã«ãµã¤ãºå¤æ´ãããSIGWINCH ãé©å㪠ãã‐
              ã»ã¹ã«éãããã ãã®ã³ã¼ã«ã«ãã Unicode ã®ãããã³ã°ãç¡å¹ã«ãªãã

       PIO_FONTRESET
              ã¹ã¯ãªã¼ã³ãã©ã³ãããµã¤ãºã Unicode ãããã³ã°ããã¼ãæã®ããã©ã«ãå¤ã«
              ãªã»ãããããargp ã¯ç¨ããããªãããå°æ¥ã®ãã¼ã¸ã§ã³ã® Linux
              ã¨ã®äºææ§ãä¿ã¤ããã« NULL ã«ã»ãããã¹ãã§ããã

       GIO_SCRNMAP
              ã¹ã¯ãªã¼ã³ãããã³ã°ãã«ã¼ãã«ããåå¾ãããargp ã¯ãµã¤ãº E_TABSZ ã®
              é åãæãããã®é åã«ã¯åãã£ã©ã¯ã¿ã¼ã表示ããã®ã«ç¨ãããããã©ã³ãã®
              ä½ç½®ããã¼ãããã¦ããã ãã®å¼ã³åºãã¯ç¾å¨ãã¼ãããã¦ãããã©ã³ãã 256 æå‐
              ãããå¤ãæã«ã¯ ç¡æå³ãªæå ±ãè¿ãäºãå¤ãã

       GIO_UNISCRNMAP
              ãã« Unicode ã¹ã¯ãªã¼ã³ãããã³ã°ãã«ã¼ãã«ããåå¾ããã argp ã¯ãµã¤ãº
              E_TABSZ*sizeof(unsigned short) ã®é åãæãã ãã®é åã«ã¯åã‐
              ã£ã©ã¯ã¿ã¼ã示ã Unicode ããã¼ãããã¦ããã U+F000 ã«å§ã¾ã Unicode
              ã®ç¹å¥ãªéåã¯ãããã©ã³ãç´æ¥ãª (direct to font)ã
              ãããã³ã°ã示ãã®ã«ç¨ãããã (ã«ã¼ãã« 1.3.1 以é)ã

       PIO_SCRNMAP
              ãã¦ã¼ã¶ã¼å®ç¾©å¯è½ãª(user definable)ã(4çªç®ã®)ãã¼ãã«ãã«ã¼ãã«ã«
              ãã¼ãããããã®ãã¼ãã«ã¯åãã¤ããã¹ã¯ãªã¼ã³ã·ã³ãã«ã«ãããã³ã°ããã argp
              ã¯ãµã¤ãºE_TABSZã®é åãæãã

       PIO_UNISCRNMAP
              ãã¦ã¼ã¶ã¼å®ç¾©å¯è½ãªã(4çªç®ã®)ãã¼ãã«ãã«ã¼ãã«ã«ãã¼ãããã
              ãã®ãã¼ãã«ã¯åãã¤ããã¦ãã³ã¼ãã«ãããã³ã°ãããã®å¾ã ç¾å¨ã‐
              ã¼ãããã¦ããã¦ãã³ã¼ããããã©ã³ãã¸ã®ãããã«å¾ã ã¹ã¯ãªã¼ã³ã·ã³ãã«ã«å¤æãããã
              U+F000 ã«å§ã¾ãã¦ãã³ã¼ãã¯ç´æ¥ãã©ã³ãã·ã³ãã«ã«ãããã³ã°ããã®ã«
              使ãã(ã«ã¼ãã« 1.3.1 以é)

       GIO_UNIMAP
              Unicode ãããã©ã³ãã¸ã®ãããã³ã°ãã«ã¼ãã«ããåå¾ããã argp ã¯ã

                  struct unimapdesc {
                      unsigned short  entry_ct;
                      struct unipair *entries;
                  };

              ã¨ããæ§é ä½ãæãã ãã㧠entries
              ã¯ä»¥ä¸ã®æ§é ä½ã®éåã¸ã®ãã¤ã³ã¿ã¼ã§ããã

                  struct unipair {
                      unsigned short unicode;
                      unsigned short fontpos;
                  };

              (ã«ã¼ãã« 1.1.92 以é)

       PIO_UNIMAP
              Unicode ãããã©ã³ãã¸ã®ãããã³ã°ãã«ã¼ãã«ã«ã»ããããã argp ã¯æ§é ä½
              struct unimapdesc ã¸ã®ãã¤ã³ã¿ã¼ã§ããã (ã«ã¼ãã« 1.1.92 以é)

       PIO_UNIMAPCLR
              ãã¼ãã«ãã¯ãªã¢ãããã®äºããã·ã¥ã¢ã«ã´ãªãºã ã«ä¼ããã argpã¯

                  struct unimapinit {
                      unsigned short advised_hashsize;  /* 0 if no opinion */
                      unsigned short advised_hashstep;  /* 0 if no opinion */
                      unsigned short advised_hashlevel; /* 0 if no opinion */
                  };

              (ã«ã¼ãã« 1.1.92 以é)

       KDGKBMODE
              ç¾å¨ã®ãã¼ãã¼ãã¢ã¼ããåå¾ãããargp ã®æã long åå¤æ°ãã
              次ã®ãã¡ã®ã©ããã«è¨å®ãããã


              K_RAW         0x00
              K_XLATE       0x01
              K_MEDIUMRAW   0x02
              K_UNICODE     0x03

       KDSKBMODE
              ç¾å¨ã®ãã¼ãã¼ãã¢ã¼ããè¨å®ããã argp ã¯ä¸è¨ã®å¤ã®ãã¡ã®ã©ããã«çãã long
              ã«ããã

       KDGKBMETA
              ã¡ã¿ãã¼ãã³ããªã³ã°ã¢ã¼ã(meta key handling mode)ãåå¾ããã argp ãæã
              long åå¤æ°ã¯ã次ã®ãã¡ã®ã©ããã«è¨å®ãããã


              K_METABIT     0x03   ä¸ä½ããããã»ãã
              K_ESCPREFIX   0x04   ã¨ã¹ã±ã¼ããã¬ãã£ãã¯ã¹

       KDSKBMETA
              ã¡ã¿ãã¼ãã³ããªã³ã°ã¢ã¼ããè¨å®ããã argp ã¯ä¸è¨ã®å¤ã®ã©ããã«çãã long
              ã«ããã

       KDGKBENT
              ãã¼ã³ã¼ããã¢ã¯ã·ã§ã³ã³ã¼ãã«å¤æãããã¼å¤æ表ã®ã¨ã³ããªã¼ã®ä¸ã¤ã
              åå¾ããã argp ã¯ã

                  struct kbentry {
                      unsigned char  kb_table;
                      unsigned char  kb_index;
                      unsigned short kb_value;
                  };

              ã¸ã®ãã¤ã³ã¿ã¼ã§ããã æåã®2ã¤ã®è¦ç´ ãkb_table ã«ã¯é¸æãããã¼ãã¼ãã« (0
              <= kb_table < MAX_NR_KEYMAPS)ãkb_index ã«ã¯ãã¼ã³ã¼ã(0 <=
              kb_index < NR_KEYS)ãè¨å®ããã kb_value
              ã¯å¯¾å¿ããã¢ã¯ã·ã§ã³ã³ã¼ããã¾ãã¯ããã®ãããªãã¼ã ãªãã¨ãã«ã¯
              K_HOLEãkb_table ãç¡å¹ãªæã«ã¯ K_NOSUCHMAP ã«è¨å®ãããã

       KDSKBENT
              å¤æãã¼ãã«ã®ã¨ã³ããªã¼ã®ä¸ã¤ãè¨å®ãããargp 㯠æ§é ä½ struct kbentry
              ã¸ã®ãã¤ã³ã¿ã¼ã§ããã

       KDGKBSENT
              ãã¡ã³ã¯ã·ã§ã³ãã¼ã®æååãåå¾ãããargp ã¯
              以ä¸ã®æ§é ä½ã¸ã®ãã¤ã³ã¿ã¼ã§ããã

                  struct kbsentry {
                      unsigned char kb_func;
                      unsigned char kb_string[512];
                  };

              kb_func çªç®ã®ãã¡ã³ã¯ã·ã§ã³ãã¼ã®ã¢ã¯ã·ã§ã³ã³ã¼ãã«å¯¾å¿ãã
              (ãã«ã§çµç«¯ããã) æååã kb_string ã«è¨å®ãããã

       KDSKBSENT
              ãã¡ã³ã¯ã·ã§ã³ãã¼ã®æååã®ã¨ã³ããªã¼ãè¨å®ãããargp ã¯ã æ§é ä½ struct
              kbsentry ã¸ã®ãã¤ã³ã¿ã¼ã§ããã

       KDGKBDIACR
              ã«ã¼ãã«ã®ã¢ã¯ã»ã³ããã¼ãã«(accent table)ãèªã¿è¾¼ããargpã¯ã
              次ã®æ§é ä½ã¸ã®ãã¤ã³ã¿ã¼ã§ããã

                  struct kbdiacrs {
                      unsigned int   kb_cnt;
                      struct kbdiacr kbdiacr[256];
                  };

              ããã§ãkb_cnt ã¯éåä¸ã®ã¨ã³ããªã¼ã®åæ°ã§ãåãã®ã¨ã³ããªã¼ã¯
              以ä¸ã®æ§é ä½ã§ããã

                  struct kbdiacr {
                      unsigned char diacr;
                      unsigned char base;
                      unsigned char result;
                  };

       KDGETKEYCODE
              ã«ã¼ãã«ã®(ã¹ãã£ã³ã³ã¼ããããã¼ã³ã¼ã㸠å¤æãã)ã‐
              ã¼ã³ã¼ããã¼ãã«ã¨ã³ããªã¼ãèªã¿è¾¼ãã argp ã¯ã

                  struct kbkeycode {
                      unsigned int scancode;
                      unsigned int keycode;
                  };

              ã¸ã®ãã¤ã³ã¿ã¼ã§ããã keycode ã¯ãscancode ã«å¯¾å¿ããå¤ã«è¨‐
              å®ãããã(ãã ãã89 <= scancode <= 255 ã®ã¿ã«ã¤ãã¦ã1 <= scancode <=
              88 ã§ã¯ keycode == scancode ã§ããã)  (ã«ã¼ãã« 1.1.63 以é)

       KDSETKEYCODE
              ã«ã¼ãã«ã®ãã¼ã³ã¼ããã¼ãã«ã¨ã³ããªã¼ãæ¸ãè¾¼ããargp ã¯æ§é ä½ struct
              kbkeycode ã¸ã®ãã¤ã³ã¿ã¼ã§ããã (ã«ã¼ãã« 1.1.63 以é)

       KDSIGACCEPT
              ãã®é¢æ°å¼ã³åºãã¯ãç¹å¥ãªçµåãã§ãã¼ãæ¼ããæã«çºçããã·ã°ãã« argp (1 <=
              argp <= NSIG) ãé²ãã§åãä»ãããã©ããã示ãã
              (linux/drivers/char/keyboard.c ã® spawn_console() ãè¦ãã)

       VT_OPENQRY
              æåã®ç©ºãã¦ãã(ã¾ã ãªã¼ãã³ããã¦ããªã)ã³ã³ã½ã¼ã«ãè¿ãã argp ã®æã int
              åã®æ´æ°ã«ã¯ãvt ã®çªå·ãã»ããããã (1 <= *argp <= MAX_NR_CONSOLES)ã

       VT_GETMODE
              ã¢ã¯ãã£ã㪠vt ã®ã¢ã¼ããåå¾ããã argp ã¯ã

                  struct vt_mode {
                     char mode;     /* vt mode */
                     char waitv;    /* if set, hang on writes if not active */
                     short relsig;  /* signal to raise on release req */
                     short acqsig;  /* signal to raise on acquisition */
                     short frsig;   /* unused (set to 0) */
                  };

              ã¨ããæ§é ä½ãæããã¤ã³ã¿ã¼ã§ããã ã¢ã¯ãã£ã㪠vt ã®ã¢ã¼ããã»ãããããã mode
              ã¯æ¬¡ã®ã©ããã«è¨å®ãããã


              VT_AUTO      èªå vt åæ¿
              VT_PROCESS   ããã»ã¹å¶å¾¡åæ¿
              VT_ACKACQ    ã¢ã¯ããªãã¸åæ¿

       VT_SETMODE
              ã¢ã¯ãã£ã㪠vt ã®ã¢ã¼ããè¨å®ãããargp ã¯æ§é ä½ struct vt_mode ã¸ã®
              ãã¤ã³ã¿ã¼ã§ããã

       VT_GETSTATE
              ã°ãã¼ãã«ãª vt ã®ç¶æã®æå ±ãåå¾ãããargpã¯ã

                  struct vt_stat {
                     unsigned short v_active;  /* active vt */
                     unsigned short v_signal;  /* signal to send */
                     unsigned short v_state;   /* vt bit mask */
                  };

              ã¸ã®ãã¤ã³ã¿ã¼ã§ããã 使ç¨ããã¦ããããããã® vt ã«ã¤ã v_state
              ã®å¯¾å¿ãããããã ã»ãããããã (ã«ã¼ãã«l 1.0 ãã 1.1.92 ã¾ã§)

       VT_RELDISP
              ãã£ã¹ãã¬ã¼ã解æ¾ããã

       VT_ACTIVATE
              argp (1 <= argp <= MAX_NR_CONSOLES)ã® vt ã«åæ¿ããã

       VT_WAITACTIVE
              argpã® vt ãã¢ã¯ãã£ãã«ãªãã¾ã§å¾ã¤ã

       VT_DISALLOCATE
              argp ã® vt ã«çµã³ã¤ããããã¡ã¢ãªã¼ã解æ¾ããã (ã«ã¼ãã« 1.1.54 以é)

       VT_RESIZE
              ã«ã¼ãã«ãèªèããã¹ã¯ãªã¼ã³ãµã¤ãºãè¨å®ãããargp ã¯ã

                  struct vt_sizes {
                     unsigned short v_rows;       /* # rows */
                     unsigned short v_cols;       /* # columns */
                     unsigned short v_scrollsize; /* no longer used */
                  };

              ã¸ã®ãã¤ã³ã¿ã¼ã§ããã ããã¯ãããªã¢ã¼ããå¤æ´ããªãäºã«æ³¨æã resizecons(8)
              ãè¦ã(ã«ã¼ãã« 1.1.54 以é)ã

       VT_RESIZEX
              ã«ã¼ãã«ãèªèããå種ã®ã¹ã¯ãªã¼ã³ãã©ã¡ã¼ã¿ã¼ãè¨å®ãããargp ã¯ã
              以ä¸ã®æ§é ä½ã¸ã®ãã¤ã³ã¿ã¼ã§ããã

                  struct vt_consize {
                      unsigned short v_rows;  /* number of rows */
                      unsigned short v_cols;  /* number of columns */
                      unsigned short v_vlin;  /* number of pixel rows
                                                 on screen */
                      unsigned short v_clin;  /* number of pixel rows
                                                 per character */
                      unsigned short v_vcol;  /* number of pixel columns
                                                 on screen */
                      unsigned short v_ccol;  /* number of pixel columns
                                                 per character */
                  };

              ãã©ã¡ã¼ã¿ã¼ã¯ã¼ãã§ãã£ã¦ãããããã®ã¨ãã¯ãå¤æ´ããªããã¨ãã
              æå³ããããè¤æ°ã®ãã©ã¡ã¼ã¿ã¼ãè¨å®ãããæã«ã¯ãããã®éã§çç¾ã
              ãªãããã«ããªããã°ãªããªãã
              ãã®é¢æ°å¼ã³åºãã«ãã£ã¦ããããªã¢ã¼ãã¯å¤æ´ãããªãäºã«æ³¨æã
              resizecons(8)  ãåç§ã®äº(ã«ã¼ãã« 1.3.3 以é)ã

       以ä¸ã® ioctl ãã©ã®ããã«åä½ããããã¯ãargp ãæãæ§é ä½ã® æåã®ãã¤ã(ããã§ã¯
       subcode ã¨å¼ã¶)ã«ä¾åããã
       ãããã®å¼åºãã¯ãã¹ã¼ãã¼ã¦ã¼ã¶ã¼ãç¾å¨ã®ç«¯æ«ã®ãªã¼ãã«ã®ã¿è¨±ãããã

       TIOCLINUX, subcode=0
              ã¹ã¯ãªã¼ã³ããã³ã(dump)ãã ã«ã¼ãã« 1.1.92 以éã§ãªããªã£ã(1.1.92
              以éã§ã¯ã代ããã« /dev/vcsN ã¾ã㯠/dev/vcsaN ããèªã¿è¾¼ã)ã

       TIOCLINUX, subcode=1
              ã¿ã¹ã¯æå ±ãåå¾ãããã«ã¼ãã« 1.1.92 ã§ãªããªã£ãã

       TIOCLINUX, subcode=2
              é¸æãè¨å®ããã argp ãæãã®ã¯ã

                  struct {
                     char subcode;
                     short xs, ys, xe, ye;
                     short sel_mode;
                  }

              ã§ããããã㧠xs 㨠ys ã¯å§ãã®æ¡ã¨è¡ã§ãxe 㨠ye ã¯çµãã®æ¡ã¨ è¡ã§ããã
              (å·¦ä¸ã®éã æ¡=è¡=1 ) sel_mode 㯠0 ãæå‐
              æ¯ã®é¸æã§ã1ã¯èªæ¯ã®é¸æã2ã¯è¡æ¯ã®é¸æã æå³ããã
              示ãããã¹ã¯ãªã¼ã³ä¸ã®æåã¯ãã¤ã©ã¤ã表示ãã devices/char/console.c
              ã® éçéå sel_buffer ã«ä¿åãããã

       TIOCLINUX, subcode=3
              é¸æãããã®ããã¼ã¹ãããã é¸æãããã¡ã¼ä¸ã®æå ã fd ã«æ¸ãåºãããã

       TIOCLINUX, subcode=4
              ã¹ã¯ãªã¼ã³ãã¢ã³ãã©ã³ã¯(unblank)ããã

       TIOCLINUX, subcode=5
              èªæ¯ã®é¸æã®ããã®ãèªãä¸ã®æåãè¦å®ãã¦ãã 256 ãããã®ã«ãã¯ã¢ãã
              ãã¼ãã«ã®å容ãè¨å®ãã(ã«ã¼ãã« 1.1.32 以é)ã

       TIOCLINUX, subcode=6
              argp ã¯æåå¤æ°ãæããã¤ã³ã¿ã¼ã§ããã®å容ãã«ã¼ãã«å¤æ°
              shift_stateã®å¤ã«è¨å®ããã(ã«ã¼ãã« 1.1.32 以é)ã

       TIOCLINUX, subcode=7
              argp ã¯æåå¤æ°ãæããã¤ã³ã¿ã¼ã§ããã®å容ãã«ã¼ãã«å¤æ° report_mouse
              ã®å¤ã«è¨å®ããã(ã«ã¼ãã« 1.1.33 以é)ã

       TIOCLINUX, subcode=8
              ã¹ã¯ãªã¼ã³å¹ãã¹ã¯ãªã¼ã³é«ããã«ã¼ã½ã«ä½ç½®ãå¨ã¦ã®æåå±æ§ã®çµããã³ããã
              (ã«ã¼ãã« 1.1.67 ãã 1.1.91ã¾ã§ã®ã¿ã ã«ã¼ãã« 1.1.92 以éã§ã¯
              /dev/vcsa* ããèªã¿è¾¼ã)ã

       TIOCLINUX, subcode=9
              ã¹ã¯ãªã¼ã³å¹ãã¹ã¯ãªã¼ã³é«ããã«ã¼ã½ã«ä½ç½®ãå¨ã¦ã®æåå±æ§ã®çµã復åãã
              (ã«ã¼ãã« 1.1.67 ãã 1.1.91 ã¾ã§ã®ã¿ã ã«ã¼ãã« 1.1.92 以éã§ã¯
              /dev/vcsa* ã«æ¸ãè¾¼ã)ã

       TIOCLINUX, subcode=10
              æ°ä¸ä»£ã¢ãã¿ã¼ã®ãã¯ã¼ã»ã¼ãæ©è½ãå¶å¾¡ããã VESA ã¹ã¯ãªã¼ã³ãã©ã³ã‐
              ã³ã°ã¢ã¼ãã argp[1]ã«è¨å®ãããã ãã®å¤ã¯ã¹ã¯ãªã¼ã³ãã©ã³ã‐
              ã³ã°ãã©ã®ããã«è¡ããããã示ãã以ä¸ããã® å¤ã§ããã

              0: ã¹ã¯ãªã¼ã³ãã©ã³ãã³ã°ãªãã

              1: ç¾å¨ã®ãããªã¢ããã¿ã¼ã¬ã¸ã¹ã¿ã¼ãä¿åããããã¨ã ã³ã³ãã‐
                 ã¼ã©ã¼ã¯åç´åæãã«ã¹ããªãã«ããããããã°ã©ã ãããã ããã«ãã
                 ã¢ãã¿ã¼ã¯ãã¹ã¿ã³ãã¤ãã¢ã¼ãã«å¥ãã ã¢ãã¿ã¼ã« Off_Mode
                 ã¿ã¤ãã¼ãåãã£ã¦ããã°ã æçµçã«ã¯ã¢ãã¿ã¼ãèªåã§é»æºãè½ã¨ãã

              2: ç¾å¨ã®è¨å®ãä¿åããå¾ãåç´ãæ°´å¹³åæãã«ã¹ããªãã«ãªãã
                 ããã«ããã¢ãã¿ã¼ã¯ããªããã¢ã¼ãã«ãªãã ã¢ãã¿ã¼ã« Off_Mode
                 ã¿ã¤ãã¼ããªãæãã¾ãã¯ãblank_timer
                 ãã¿ã¤ã ã¢ã¦ããããããã«ã¢ãã¿ã¼ã®é»æºãè½ãããã¨ãã«ãã®é¸æè¢ãé¸ã¶ã
                 (注æï¼é »ç¹ã«ã¢ãã¿ã¼ã®é»æºãåãã¨ã¢ãã¿ã¼ãçããã) (1.1.76 以é)

è¿ãå¤
       æåæã«ã¯ 0 ãè¿ããããã¨ã©ã¼ã®å ´å -1 ãè¿ããã errno ãè¨å®ãããã

ã¨ã©ã¼
       errno ã¯æ¬¡ã®ãããªå¤ãã¨ã:

       EBADF  ãã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ã¼ãç¡å¹ã

       ENOTTY ãã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ã¼ããã£ã©ã¯ã¿ã¼ã¹ãã·ã£ã«ããã¤ã¹ã¨é¢é£ä»ãããã¦
              ããªããã¾ãã¯ãè¦æ±ããããã®ãããã«å½ã¦ã¯ã¾ããªãã

       EINVAL ãã¡ã¤ã«ãã£ã¹ã¯ãªãã¿ã¼ã¾ã㯠argp ãç¡å¹ã

       EPERM  権éãä¸ååã

注æ
       è¦å: ãã®ããã¥ã¢ã«ãã¼ã¸ã Linux ã®ã³ã³ã½ã¼ã« ioctl ãææ¸åãããã®ã¨æããªãäºã
       ããã¯ãèå³ããã人ãã½ã¼ã¹ãèªããã¨ã®ä»£ããã«ãªãããã«ç¨æããç©ã§ããã ioctl
       ã¯ææ¸åãããªã Linux ã®åé¨æ©è½ã§ãã£ã¦ãè¦åãªãã« å¤æ´ããããã¨ãããã
       (ããã¦ããã®ãã¼ã¸ã¯ã«ã¼ãã« 1.1.94 ã®ã¨ãã®ç¶æ³ãè¨è¿°ããç©ã§ãããã¯
       以åã®ãã¼ã¸ã§ã³ã¨æ¯ã¹ãã°ãå¤ãã®éãããã)

       ioctl ã¯ã«ã¼ãã«ã¨ãããç¹å®ã®ããç¥ãããããã°ã©ã ã¨ã®æå ±äº¤æã®ããã«
       å°å¥ãããäºãé常ã«å¤ã(fdisk, hdparm, setserial,tunelp, loadkeys,
       selection, setfont ãªã©)ããã®ãã ioctl ã®åä½ã¯ããã®ç¹å®ã®ããã°ã©ã ã
       å¿è¦ã¨ããæã«ã¯å¤æ´ã«ãªãã

       ãããã® ioctl ã使ã£ãããã°ã©ã ã¯ä»ã®ãã¼ã¸ã§ã³ã® UNIX ã¨ã®äºææ§ã
       ãªãããå¤ããã¼ã¸ã§ã³ã® Linux ã§ã¯ãèµ°ããªããããã«å°æ¥ã®ãã¼ã¸ã§ã³ã® Linux
       ã§ã¯èµ°ããªããªãããç¥ããªãã

       POSIX æ©è½ã使ããªããã

é¢é£é ç®
       dumpkeys(1), kbd_mode(1), loadkeys(1), mknod(1), setleds(1),
       setmetamode(1), execve(2), fcntl(2), ioperm(2), termios(3), console(4),
       console_codes(4), mt(4), sd(4), tty(4), tty_ioctl(4), ttyS(4), vcs(4),
       vcsa(4), charsets(7), mapscrn(8), resizecons(8), setfont(8)

       /usr/include/linux/kd.h, /usr/include/linux/vt.h

ãã®ææ¸ã«ã¤ãã¦
       ãã® man ãã¼ã¸ã¯ Linux man-pages ããã¸ã§ã¯ãã®ãªãªã¼ã¹ 3.79 ã®ä¸é¨
       ã§ãããããã¸ã§ã¯ãã®èª¬æã¨ãã°å ±åã«é¢ããæå ±ã¯
       http://www.kernel.org/doc/man-pages/ ã«æ¸ããã¦ããã



Linux                             2009-02-28                  CONSOLE_IOCTL(4)