swapon(2) DG/UX 5.4R3.00 swapon(2)
NAME
swapon - add a swap device for demand paging
SYNOPSIS
int swapon(char *special);
where:
special Pathname of the block device to page on
DESCRIPTION
The swapon() function makes the block device special available to the
system to use for paging. The entire device is made available for
use for paging; the previous contents of the storage will be
overwritten.
ACCESS CONTROL
The effective user id of the calling process must be superuser.
RETURN VALUE
Upon successful completion, swapon() returns a value of 0.
Otherwise, it returns the value -1, and sets errno to indicate an
error.
DIAGNOSTICS
Under the following conditions, swapon() fails and sets errno to:
EPERM if the effective user id of the calling process is not
superuser.
ENOSPC if the swap area could not be set up because the system
already has the maximum number of paging areas in use.
ENODEV if the swap area could not be set up because its size is
bigger than the maximum or smaller than the minimum
allowable size for a paging area.
ENOTBLK if the file with the specified pathname is not a block
special file.
EBUSY if the given device is already in use.
ENOENT if there is no file with the specified pathname.
ENOENT if a non-terminal component of the specified pathname
does not exist.
ENOTDIR if a non-terminal component of the specified pathname was
not a directory or symbolic link.
ENAMETOOLONG
if the pathname exceeds the length limit for pathnames.
ENAMETOOLONG
if a component of the pathname exceeds the length limit
Licensed material--property of copyright holder(s) 1
swapon(2) DG/UX 5.4R3.00 swapon(2)
for filenames.
ELOOP if the number of symbolic links encountered during
pathname resolution exceeds the system maximum. A
symbolic link cycle is suspected.
EFAULT if the pathname does not completely reside in the
process's address space or the pathname does not
terminate in the process's address space.
SEE ALSO
swapon(1M).
Licensed material--property of copyright holder(s) 2