Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ swapon(2) — SunOS 4.0.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fstab(5)

config(8)

swapon(8)

SWAPON(2)  —  SYSTEM CALLS

NAME

swapon − add a swap device for interleaved paging/swapping

SYNOPSIS

int 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. 

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. 

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. 

SEE ALSO

fstab(5), config(8), swapon(8)

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 4.0  —  Last change: 22 March 1989

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