Thu Apr 28 11:58:50 2011 UTC ()
Sort ERRORS.


(wiz)
diff -r1.37 -r1.38 src/lib/libc/sys/swapctl.2

cvs diff -r1.37 -r1.38 src/lib/libc/sys/swapctl.2 (expand / switch to unified diff)

--- src/lib/libc/sys/swapctl.2 2010/05/31 12:16:20 1.37
+++ src/lib/libc/sys/swapctl.2 2011/04/28 11:58:50 1.38
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: swapctl.2,v 1.37 2010/05/31 12:16:20 njoly Exp $ 1.\" $NetBSD: swapctl.2,v 1.38 2011/04/28 11:58:50 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 1997 Matthew R. Green 3.\" Copyright (c) 1997 Matthew R. Green
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
@@ -202,69 +202,68 @@ or @@ -202,69 +202,68 @@ or
202.Fn swapctl 202.Fn swapctl
203returns the number of swap devices, if successful. 203returns the number of swap devices, if successful.
204The 204The
205.Dv SWAP_NSWAP 205.Dv SWAP_NSWAP
206command is always successful. 206command is always successful.
207Otherwise it returns 0 on success and \-1 207Otherwise it returns 0 on success and \-1
208on failure, setting the global variable 208on failure, setting the global variable
209.Va errno 209.Va errno
210to indicate the error. 210to indicate the error.
211.Sh ERRORS 211.Sh ERRORS
212.Fn swapctl 212.Fn swapctl
213succeeds unless: 213succeeds unless:
214.Bl -tag -width Er 214.Bl -tag -width Er
215.It Bq Er ENOTDIR 
216A component of the path prefix is not a directory. 
217.It Bq Er ENAMETOOLONG 
218A component of a pathname exceeded 
219.Brq Dv NAME_MAX 
220characters, or an entire path name exceeded 
221.Brq Dv PATH_MAX 
222characters. 
223.It Bq Er ENOENT 
224The named device does not exist. 
225For the 
226.Dv SWAP_CTL 
227command, the named device is not currently enabled for swapping. 
228.It Bq Er EACCES 215.It Bq Er EACCES
229Search permission is denied for a component of the path prefix. 216Search permission is denied for a component of the path prefix.
230.It Bq Er ELOOP 
231Too many symbolic links were encountered in translating the pathname. 
232.It Bq Er EPERM 
233The caller is not the super-user. 
234.It Bq Er EBUSY 217.It Bq Er EBUSY
235The device specified by 218The device specified by
236.Fa arg 219.Fa arg
237has already been made available for swapping. 220has already been made available for swapping.
 221.It Bq Er EFAULT
 222.Fa arg
 223points outside the process' allocated address space.
238.It Bq Er EINVAL 224.It Bq Er EINVAL
239The device configured by 225The device configured by
240.Fa arg 226.Fa arg
241has no associated size, or the 227has no associated size, or the
242.Fa cmd 228.Fa cmd
243was unknown. 229was unknown.
 230.It Bq Er EIO
 231An I/O error occurred while opening the swap device.
 232.It Bq Er ELOOP
 233Too many symbolic links were encountered in translating the pathname.
 234.It Bq Er ENAMETOOLONG
 235A component of a pathname exceeded
 236.Brq Dv NAME_MAX
 237characters, or an entire path name exceeded
 238.Brq Dv PATH_MAX
 239characters.
 240.It Bq Er ENOENT
 241The named device does not exist.
 242For the
 243.Dv SWAP_CTL
 244command, the named device is not currently enabled for swapping.
 245.It Bq Er ENOTDIR
 246A component of the path prefix is not a directory.
244.It Bq Er ENXIO 247.It Bq Er ENXIO
245The major device number of 248The major device number of
246.Fa arg 249.Fa arg
247is out of range (this indicates no device driver exists 250is out of range (this indicates no device driver exists
248for the associated hardware). 251for the associated hardware); or
249.It Bq Er ENXIO 252the block device specified by
250The block device specified by 
251.Fa arg 253.Fa arg
252is not marked as a swap partition in the disklabel. 254is not marked as a swap partition in the disklabel.
253.It Bq Er EIO 255.It Bq Er EPERM
254An I/O error occurred while opening the swap device. 256The caller is not the super-user.
255.It Bq Er EFAULT 
256.Fa arg 
257points outside the process' allocated address space. 
258.El 257.El
259.Sh SEE ALSO 258.Sh SEE ALSO
260.Xr swapctl 8 259.Xr swapctl 8
261.Sh HISTORY 260.Sh HISTORY
262The 261The
263.Fn swapctl 262.Fn swapctl
264function call appeared in 263function call appeared in
265.Nx 1.3 . 264.Nx 1.3 .
266The 265The
267.Fa se_path 266.Fa se_path
268member was added to 267member was added to
269.Va struct swapent 268.Va struct swapent
270in 269in