syscalls_106.html

来自「Linux系统调用」· HTML 代码 · 共 36 行

HTML
36
字号
<!-- This HTML file has been created by texi2html 1.29
     from syscalls.texi on 4 June 1994 -->

<TITLE>Syscall specifications of Linux - swapoff</TITLE>
<P>Go to the <A HREF="syscalls_105.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_105.html">previous</A>, <A HREF="syscalls_107.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_107.html">next</A> section.<P>
<H2><A NAME="SEC106" HREF="syscalls_toc.html#SEC106" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_toc.html#SEC106">swapoff and swapon</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int swapon(const char *<VAR>path</VAR>);</CODE>
<P>
<CODE>int swapoff(const char *<VAR>path</VAR>);</CODE>
 
<H3>PARAMETERS</H3>
<P>
<VAR>path</VAR>: [in] points to the path to add/remove.
 
<H3>DESCRIPTION</H3>
<P>
<CODE>swapon</CODE> adds the swap area specified by <VAR>path</VAR> to the swap
pool. <CODE>swapoff</CODE> removes the swap area specified by <VAR>path</VAR> from
the swap pool. The calling task must have superuser privileges.
<P>
<H3>RETURN VALUE</H3>
<P>
On success zero is returned. On error -1 is returned and <CODE>errno</CODE> is
set to one of the following:
<P>
<UL>
<LI><CODE>EPERM</CODE>: the calling task does not have superuser privileges.
<LI><CODE>EINVAL</CODE>: path is not a block device nor a regular path.
<LI><CODE>ENOENT</CODE> or <CODE>ENOMEM</CODE>.
</UL>
<P>
<P>Go to the <A HREF="syscalls_105.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_105.html">previous</A>, <A HREF="syscalls_107.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_107.html">next</A> section.<P>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?