Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ swapon(2) — bsd — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

swapon(8)

SWAPON(2)                            BSD                             SWAPON(2)



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
     swapon fails if any of the following is true.

     [EACCES]         Search permission is denied for a component of the path
                      prefix.

     [EIO]            An I/O error occurred while opening the swap device.

     [ENAMETOOLONG]   A component of a pathname exceeded 255 characters, or an
                      entire pathname exceeded 1023 characters.

     [ENOENT]         The named device does not exist.

     [ENOTBLK]        special is not a block device.

     [ENOTDIR]        A component of the path prefix is not a directory.

     [ENXIO]          The major device number of special is out of range (this
                      indicates no device driver exists for the associated
                      hardware).

     [EPERM]          The caller is not the super-user.

SEE ALSO
     swapon(8)

DIAGNOSTICS
     If an error has occurred, a value of -1 is returned and errno is set to
     indicate the error.

NOTES
     Under other implementations, swapon fails if any of the following is
     true.

     [EBUSY]          The device specified by special has already been made
                      available for swapping

     [EINVAL]         The pathname contains a character with the high-order
                      bit set.

     [ELOOP]          Too many symbolic links were encountered in translating
                      the pathname.

     [EINVAL]         The device configured by special was not configured into
                      the system as a swap device.

     [EFAULT]         special points outside the process' allocated address
                      space.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026