*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> swapon (2)              
Title
Content
Arch
Section
 

swapon(2)

Contents


NAME    [Toc]    [Back]

       swapon  -  Add  a  swap  device for interleaved paging and
       swapping

SYNOPSIS    [Toc]    [Back]

       int swapon(
               char *pat,
               int options,
               int lowat,
               int hiwat );

PARAMETERS    [Toc]    [Back]

       Specifies the block special device to be  made  available.
       Specifies  an  option.   Only the MS_PREFER option is currently
 supported, and it causes the specified path  to  be
       the  preferred  paging device. (Ignored on Tru64 UNIX systems.)
  Specifies the low water mark.  (Ignored  on  Tru64
       UNIX systems.)  Specifies the high water mark. (Ignored on
       Tru64 UNIX systems.)

DESCRIPTION    [Toc]    [Back]

       The swapon() function makes a block special device  available
  to  the system for allocation of paging and swapping
       space. (The operating system does  not  currently  support
       paging  and  swapping  to  a normal file. All swapping and
       paging areas must be block special devices.)

       The calling process must have superuser privilege to  call
       the swapon() function.

RETURN VALUES    [Toc]    [Back]

       Upon  successful completion, the swapon() function returns
       a value of 0 (zero). If  an  error  has  occurred,  -1  is
       returned and errno is set to indicate the error.

ERRORS    [Toc]    [Back]

       If the swapon() function fails, errno may be set to one of
       the following values: Search permission is  denied  for  a
       component of the path prefix.  The device specified by the
       path parameter has already been made available  for  swapping.
   The  path  parameter  points  outside the process'
       allocated address space.  The pathname contains a  character
 with the high-order bit set, the device was not specified,
 the device configured by the path parameter was  not
       configured into the system as a swap device, or the device
       does not allow paging.  An I/O error occurred while  opening
 the swap device.  Too many symbolic links were encountered
 in translating the pathname.  A component of a pathname
  exceeded  NAME_MAX characters, or an entire pathname
       exceeded PATH_MAX characters.  The named device  does  not
       exist.  A component of the path prefix is not a directory.
       The major device number of the path parameter  is  out  of
       range.  (This  indicates  that no device driver exists for
       the associated hardware.)  The caller does not have appropriate
  privilege.  An attempt was made to activate a paging
 file on a read-only file system.






SEE ALSO    [Toc]    [Back]

      
      
       Commands: config(8), swapon(8)



                                                        swapon(2)
[ Back ]
 Similar pages
Name OS Title
swapon NetBSD add a swap device for interleaved paging/swapping
swapon HP-UX add swap space for interleaved paging/swapping
swapoff FreeBSD control devices for interleaved paging/swapping
swapon FreeBSD control devices for interleaved paging/swapping
swapctl FreeBSD specify devices for paging and swapping
swapoff FreeBSD specify devices for paging and swapping
swapon FreeBSD specify devices for paging and swapping
swapon Tru64 Specifies additional disk partitions for paging and swapping
swapon Linux enable/disable devices and files for paging and swapping
drum OpenBSD paging device
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service