unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

SWAPON(2)                     System Calls Manual                    SWAPON(2)



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 VALUES
       swapon() returns:

       0      on success.

       -1     on failure and sets errno to indicate the error.

ERRORS
       EACCES              Search  permission is denied for a component of the
                           path prefix of special.

       EBUSY               The device referred to by special has already  been
                           made available for swapping.

       EFAULT              special points outside the process's address space.

       EIO                 An I/O error occurred while reading from or writing
                           to the file system.

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

       ELOOP               Too  many symbolic links were encountered in trans-
                           lating special.

       ENAMETOOLONG        The length of the path argument exceeds {PATH_MAX}.

                           A pathname component is longer than {NAME_MAX} (see
                           sysconf(2V))  while  {_POSIX_NO_TRUNC} is in effect
                           (see pathconf(2V)).

       ENODEV              The device referred to by special was  not  config-
                           ured into the system as a swap device.

       ENOENT              The device referred to by special does not exist.

       ENOTBLK             The  file  referred  to  by  special is not a block
                           device.

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

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

       EPERM               The caller is not the super-user.

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 dis-
       mounted.

       This call will be upgraded in future versions of the system.



                                21 January 1990                      SWAPON(2)