SWAPON(2) — UNIX Programmer’s Manual
NAME
swapon − add a swap device for interleaved paging/swapping
SYNOPSIS
swapon(special)
char ∗special;
DESCRIPTION
Swapon makes the block device special available to the system 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 special is calculated at the time the device is first made available for swapping.
ERRORS
[EFAULT] The memory pointed to by special lies outside the valid address space for the process.
[ENOTDIR] A component of the path prefix is not a directory.
[EPERM] The pathname contains a character with the high-order bit set.
[ENOENT] The pathname is too long.
[ENOENT] Special 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.
[ENOTBLK] Special is not a block device.
[ENXIO] The major device number of special is out of range (this indicates no device driver exists for the associated hardware).
[EBUSY] The device specified by special has already been made available for swapping.
[ENODEV] The device specified by special was not configured into the system as a swap device.
[EIO] An I/O error occurred while reading from or writing to the file system.
SEE ALSO
BUGS
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.
4BSD