Subject: misc/12610: swapctl(2 and 8) should be more specific about priority
To: None <gnats-bugs@gnats.netbsd.org>
From: None <gr@eclipsed.net>
List: netbsd-bugs
Date: 04/11/2001 02:01:48
>Number:         12610
>Category:       misc
>Synopsis:       swapctl(2 and 8) should be more specific about priority
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    misc-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 10 23:02:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     gabriel rosenkoetter
>Release:        NetBSD 1.5
>Organization:
	Not so much.
>Environment:
	
System: NetBSD uriel.eclipsed.net 1.5 NetBSD 1.5 (URIEL) #0: Thu Jan 25 15:27:28 EST 2001 gr@uriel.eclipsed.net:/usr/src/sys/arch/macppc/compile/URIEL macppc


>Description:
The swapctl(2) man page mentions that it is necessary to specify a
priority with the SWAP_ON and SWAP_CTL commands, but does not list
its range (0 to N) nor its definition of "high" (0). The swapctl(8)
man page lists this information, but only in discussion of variables
to set in /etc/fstab (that is, not with the -p flag where a user
could well expect to find it), and it lists the default value
nowhere.
>How-To-Repeat:
man 2 swapctl
man 8 swapctl
>Fix:
Unified diff patches for each man page follow. Wording is mine, feel
free to change it, if you really feel like taking the time.

--- swapctl.2.orig	Wed Apr 11 01:08:03 2001
+++ swapctl.2	Wed Apr 11 01:36:45 2001
@@ -114,6 +114,7 @@
 The
 .Fa misc
 parameter is used to set the priority of this swap device.
+The highest priority is 0, second priority is 1, etc.
 .It
 If
 .Fa cmd

--- swapctl.8.orig	Wed Apr 11 01:08:04 2001
+++ swapctl.8	Wed Apr 11 01:40:13 2001
@@ -171,7 +171,9 @@
 .Fl c
 and
 .Fl l
-options.
+options. The highest priority is 0, second priority is 1, etc. If no
+.Fl p
+option is given, the priority defaults to 0.
 .It Fl k
 The
 .Fl k
@@ -204,7 +206,8 @@
 .Bl -tag -width nfsmntpt=/path -compact
 .It priority=N
 This option sets the priority of the specified swap device to N.  The
-highest priority is 0, second priority is 1, etc.
+highest priority is 0, second priority is 1, etc. If no priority is
+set, the priority defaults to 0.
 .It nfsmntpt=/path
 This option is useful for swapping to NFS files.  It specifies
 the local mount point to mount an NFS filesystem.  Typically, once
>Release-Note:
>Audit-Trail:
>Unformatted: