int
swapon(
const char *special
)
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.
)
succeeds unless:
ENOTDIR
]
ENAMETOOLONG
]
{NAME_MAX}
characters, or an entire path name exceeded
{PATH_MAX}
characters.
ENOENT
]
EACCES
]
ELOOP
]
EPERM
]
ENOTBLK
]
special
is not a block device.
EBUSY
]
special
has already
been made available for swapping
EINVAL
]
special
was not
configured into the system as a swap device.
ENXIO
]
special
is out of range (this indicates no device driver exists
for the associated hardware).
EIO
]
EFAULT
]
special
points outside the process's allocated address space.
)
function call appeared in
4.0BSD
and was removed
NetBSD1.3