Bug 77280

Summary: Typo in swapon man page
Product: Documentation Reporter: Ian <cdine>
Component: Books & ArticlesAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Ian 2005-02-08 22:40:12 UTC
Snipped from `man swapon` (Yes, swapon, swapinfo does not say to use -h) on FreeBSD -- 5.3-RELEASE-p2 FreeBSD 5.3-RELEASE-p2 #0: Mon Jan  3 02:17:43 PST 2005

==============================

SWAPON(8)               FreeBSD System Manager's Manual              SWAPON(8)

NAME
     swapon, swapoff, swapctl -- specify devices for paging and swapping
..
     Swap information can be generated using the swapinfo(8) utility, pstat
     -s, or swapctl -l.  The swapctl utility has the following options for
     listing swap:

     -h      Output values in megabytes.
..
HISTORY
     The swapon utility appeared in 4.0BSD.  The swapoff and swapctl utilities
     appeared in FreeBSD 5.1.

FreeBSD 5.3                    December 28, 2002                   FreeBSD 5.3


==============================

-h Is not a valid option of swapinfo, as demonstrated here:

# swapinfo -h
swapinfo: illegal option -- h
usage: swapinfo [-k] [-M core [-N system]]
# swapinfo -k
Device          1K-blocks     Used    Avail Capacity
/dev/ad0s1b       1572864    31132  1541732     2%

How-To-Repeat: # man swapon, search for "-h" i.e. if your viwer is more, type "/" and then "-h" followed by a return.
Comment 1 ru freebsd_committer freebsd_triage 2005-02-09 10:11:46 UTC
State Changed
From-To: open->closed

-h is a valid option for swapctl(8). 
-h is not a valid option for swapinfo(8) which has its own manpage.
Comment 2 Giorgos Keramidas freebsd_committer freebsd_triage 2005-02-09 17:22:39 UTC
On 2005-02-08 22:30, Ian <cdine@cdine.org> wrote:
> NAME
>      swapon, swapoff, swapctl -- specify devices for paging and swapping
> ..
>      Swap information can be generated using the swapinfo(8) utility, pstat
>      -s, or swapctl -l.  The swapctl utility has the following options for
>      listing swap:
>
>      -h      Output values in megabytes.
>
> ==============================
>
> -h Is not a valid option of swapinfo, as demonstrated here:

Good point...

FWIW, I have a patch that adds this option to pstat and swapinfo.
Most of it has been reviewed a couple of times by Ruslan Ermilov, and
I plan to commit it as soon as I get back home.

So, in my opinion, the correct fix is to add the missing option,
instead of removing the manpage stuff :-)

- Giorgos