BSD 4_3_Tahoe development
[unix-history] / usr / man / cat2 / swapon.0
SWAPON(2) UNIX Programmer's Manual SWAPON(2)
N\bNA\bAM\bME\bE
swapon - add a swap device for interleaved paging/swapping
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
s\bsw\bwa\bap\bpo\bon\bn(\b(s\bsp\bpe\bec\bci\bia\bal\bl)\b)
c\bch\bha\bar\br *\b*s\bsp\bpe\bec\bci\bia\bal\bl;\b;
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bS_\bw_\ba_\bp_\bo_\bn makes the block device _\bs_\bp_\be_\bc_\bi_\ba_\bl available to the sys-
tem for allocation for paging and swapping. The names of
potentially available devices are known to the system and
defined at system configuration time. The size of the swap
area on _\bs_\bp_\be_\bc_\bi_\ba_\bl is calculated at the time the device is
first made available for swapping.
R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bE
If an error has occurred, a value of -1 is returned and
_\be_\br_\br_\bn_\bo is set to indicate the error.
E\bER\bRR\bRO\bOR\bRS\bS
_\bS_\bw_\ba_\bp_\bo_\bn succeeds unless:
[ENOTDIR] A component of the path prefix is not a
directory.
[EINVAL] The pathname contains a character with the
high-order bit set.
[ENAMETOOLONG] A component of a pathname exceeded 255 char-
acters, or an entire path name exceeded 1023
characters.
[ENOENT] The named device does not exist.
[EACCES] Search permission is denied for a component
of the path prefix.
[ELOOP] Too many symbolic links were encountered in
translating the pathname.
[EPERM] The caller is not the super-user.
[ENOTBLK] _\bS_\bp_\be_\bc_\bi_\ba_\bl is not a block device.
[EBUSY] The device specified by _\bs_\bp_\be_\bc_\bi_\ba_\bl has already
been made available for swapping
[EINVAL] The device configured by _\bs_\bp_\be_\bc_\bi_\ba_\bl was not con-
figured into the system as a swap device.
[ENXIO] The major device number of _\bs_\bp_\be_\bc_\bi_\ba_\bl is out of
range (this indicates no device driver exists
Printed 7/9/88 March 9, 1986 1
SWAPON(2) UNIX Programmer's Manual SWAPON(2)
for the associated hardware).
[EIO] An I/O error occurred while opening the swap
device.
[EFAULT] _\bS_\bp_\be_\bc_\bi_\ba_\bl points outside the process's allo-
cated address space.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
swapon(8), config(8)
B\bBU\bUG\bGS\bS
There is no way to stop swapping on a disk so that the pack
may be dismounted.
This call will be upgraded in future versions of the system.
Printed 7/9/88 March 9, 1986 2