swapoff

å称
     swapon, swapoff — ã¤ã³ã¿ãªã¼ããã¼ã¸ã³ã°/ã¹ã¯ããç¨ã®ã¹ã¯ããããã¤ã¹ã®å¶å¾¡

ã©ã¤ãã©ãª
     Standard C Library (libc, -lc)

æ¸å¼
     <unistd.h> int swapon(const char *special) int swapoff(const char
     *special)

解説
     swapon() ã·ã¹ãã ã³ã¼ã«ã¯ãã·ã¹ãã ããã¼ã¸ã³ã°ã¨ã¹ã¯ããã³ã°ã®å²ãå½ã¦ã« ãã‐
     ãã¯ããã¤ã¹ special ã使ç¨ã§ããããã«ãã¾ãã
     æ½å¨çã«ä½¿ç¨ã§ããããã¤ã¹ã®ååã¯ã·ã¹ãã ã«ç¥ããã¦ãã¦ã ã·ã¹ãã è¨å®æã«å®ç¾©ããã¾ãã
     special ã®ã¹ã¯ããé åã®ãµã¤ãºã¯ãããã¤ã¹ãã¹ã¯ããã³ã°ã«
     åãã¦ä½¿ç¨ã§ããããã«ãªãã¨ãã«ç®åºããã¾ãã

     swapoff() ã·ã¹ãã ã³ã¼ã«ã¯ãä¸ããããããã¤ã¹ã®ãã¼ã¸ã³ã°ã¨ã¹ã¯ããã³ã°ãç¡å¹ã«ãã¾ãã
     ãã¹ã¦ã®é¢é£ããã¹ã¯ããã®ã¡ã¿ãã¼ã¿ã¯å²ãå½ã¦è§£é¤ããããã®ããã¤ã¹ã¯
     ä»ã®ç¨éã§å©ç¨å¯è½ã«ããã¾ãã

æ»ãå¤
     ã¨ã©ã¼ãçºçããå ´å㯠-1 ãè¿ãããã¨ã©ã¼ã示ãããã« errno ãè¨å®ããã¾ãã

ã¨ã©ã¼
     swapon() ããã³ swapoff() ã¯å±ã«ä»¥ä¸ã®å ´åã«å¤±æãã¾ã:

     [ENOTDIR]          ãã¹ã®æ§æè¦ç´ ä¸ã«ãã£ã¬ã¯ããªä»¥å¤ã®ãã®ãå«ã¾ãã¦ãã¾ãã

     [ENAMETOOLONG]     ãã¹åã®æ§æè¦ç´ ã 255 æåãè¶ãã¦ãããã ã¾ãã¯ãã¹åå¨ä½ã 1023
                        æåãè¶ãã¦ãã¾ãã

     [ENOENT]           æå®ããããã¤ã¹ãåå¨ãã¾ããã

     [EACCES]           æå®ããããã¹ã«ã¯ãæ¤ç´¢ã許å¯ããã¦ããªããã£ã¬ã¯ããªãå«ã¾ãã¦ãã¾ãã

     [ELOOP]            ãã¹åãå¤æããã¨ãã«æ¤åºãããã·ã³ããªãã¯ãªã³ã¯ãå¤ããã¾ãã

     [EPERM]            ã¹ã¼ãã¦ã¼ã¶ä»¥å¤ã®ã¦ã¼ã¶ã«ãã£ã¦å¼ã³åºããã¾ããã

     [EFAULT]           special å¼æ°ããã‐
                        ã»ã¹ã«å²ãå½ã¦ãããã¢ãã¬ã¹ç©ºéã®å¤å´ãæãã¦ãã¾ãã

     å ãã¦ã swapon() ã¯ä»¥ä¸ã®çç±ã§å¤±æãã¾ã:

     [EINVAL]           ã·ã¹ãã ããã¼ãæã®ã¹ã¯ããããã¤ã¹æ° vm.nswapdev
                        ã®å¶éã«éãã¦ãã¾ãã

     [ENOTBLK]          special å¼æ°ã¯ãããã¯ããã¤ã¹ã§ã¯ããã¾ããã

     [EBUSY]            special
                        ã§æå®ããããã¤ã¹ã¯ããã§ã«ã¹ã¯ããã³ã°ã«ä½¿ç¨ã§ããããã«ãªã£ã¦ãã¾ãã

     [ENXIO]            special ã®ã¡ã¸ã£ã¼ããã¤ã¹çªå·ãç¯å²å¤ã«ãªã£ã¦ãã¾ã
                        (ããã¯é¢é£ãããã¼ãã¦ã§ã¢ã«å¯¾å¿ããããã¤ã¹ãã©ã¤ãã å‐
                        å¨ããªããã¨ã表ãã¾ã)ã

     [EIO]              ã¹ã¯ããããã¤ã¹ããªã¼ãã³ããéã«å¥åºåã¨ã©ã¼ãçºçãã¾ããã

     æå¾ã«ã swapoff() ã¯ä»¥ä¸ã®å ´åã«å¤±æãã¾ã:

     [EINVAL]           ç¾å¨ãã·ã¹ãã ã special ã«ã¹ã¯ãããã¦ãã¾ããã

     [ENOMEM]           ä¸ããããããã¤ã¹ã®ãã¼ã¸ã³ã°ã¨ã¹ã¯ããã³ã°ãå®å¨ã«ç¡å¹åããããã®
                        ä»®æ³ã¡ã¢ãªãååã«å©ç¨ã§ãã¾ããã

é¢é£é ç®
     config(8), swapon(8), sysctl(8)

æ´å²
     swapon() ã·ã¹ãã ã³ã¼ã«ã¯ã 4.0BSD ã§ç»å ´ãã¾ããã swapoff() ã·ã¹ãã ã³ã¼ã«ã¯ã
     FreeBSD 5.0 ã§ç»å ´ãã¾ããã