SWAPON(2) — SYSTEM CALLS
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.
SEE ALSO
RETURN VALUE
If an error has occurred, a value of −1 is returned and errno is set to indicate the error.
ERRORS
ENOTDIR A component of the path prefix of special is not a directory.
EINVAL special contains a character with the high-order bit set.
ENAMETOOLONG
The length of a component of special exceeds 255 characters, or the length of special exceeds 1023 characters.
ENOENT The device referred to by special does not exist.
EACCES Search permission is denied for a component of the path prefix of special.
ELOOP Too many symbolic links were encountered in translating special.
EPERM The caller is not the super-user.
ENOTBLK The file referred to by special is not a block device.
EBUSY The device referred to by special has already been made available for swapping.
ENODEV The device referred to by special was not configured into the system as a swap device.
ENXIO The major device number of the device referred to by special is out of range (this indicates no device driver exists for the associated hardware).
EIO An I/O error occurred while reading from or writing to the file system or opening the swap device.
EFAULT special points outside the process’s address space.
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.
Sun Release 3.2 — Last change: 16 July 1986