Bug 285413 - wlanstats(8): improve usage() and manpage nitpicks
Summary: wlanstats(8): improve usage() and manpage nitpicks
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Bjoern A. Zeeb
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-14 19:15 UTC by Ceri Davies
Modified: 2025-03-14 21:08 UTC (History)
2 users (show)

See Also:


Attachments
patch for manpage and main.c (1.58 KB, patch)
2025-03-14 19:15 UTC, Ceri Davies
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ceri Davies freebsd_committer freebsd_triage 2025-03-14 19:15:46 UTC
Created attachment 258671 [details]
patch for manpage and main.c

wlanstats prints the wrong usage statement, including a nonexistent -a flag and a description of -m that suggests multiple arguments.
The manpage could also be slightly clearer.

Patch attached.
Comment 1 Bjoern A. Zeeb freebsd_committer freebsd_triage 2025-03-14 19:38:05 UTC
If you do "station MAC_address" don't you want to rather do "station_MAC_address"?

The -a flag exists but is currently still not compiled in.
Sam had it #if 0.
I haven't gotten around to looking into it.
I disabled the command line option in 530c13c5401c1f29f8325cf851d96778852a1ba3 because of -Wunused-but-set-variable.
I am fine removing it from usage for now.

I think Phabricator would have been the easier path for man page people to review.
Do you want to commit it yourself or should I get it through review and in?
Comment 2 Ceri Davies freebsd_committer freebsd_triage 2025-03-14 20:07:25 UTC
You’re right about the station MAC address part!

I resigned my commit bit a while ago so can’t commit, happy for whatever route you prefer but I don’t really want to get into a back and forth on phabricator in truth.
Comment 3 Bjoern A. Zeeb freebsd_committer freebsd_triage 2025-03-14 20:09:38 UTC
(In reply to Ceri Davies from comment #2)

I'll adjust the patch, get it reviewed and in then.

Thanks a lot for looking at this and helping to improve it!  It's much appreciated.
Comment 4 Ceri Davies freebsd_committer freebsd_triage 2025-03-14 20:23:59 UTC
Thanks !
Comment 5 Bjoern A. Zeeb freebsd_committer freebsd_triage 2025-03-14 20:55:07 UTC
Posted as https://reviews.freebsd.org/D49365 for review of the man page.
This includes the extra _.
In case you want to check as well.
Comment 6 commit-hook freebsd_committer freebsd_triage 2025-03-14 21:07:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=36782aaba4f1a7d054aa405357a8fa2bc0f94eb0

commit 36782aaba4f1a7d054aa405357a8fa2bc0f94eb0
Author:     Ceri Davies <ceri@FreeBSD.org>
AuthorDate: 2025-03-14 20:49:39 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-03-14 21:04:51 +0000

    wlanstats: update usage, improve man page

    wlanstats prints the wrong usage statement, including a nonexistent -a
    flag (*) and a description of -m that suggests multiple arguments.
    Make the manpage slightly more clear.

    (*) the implementation of that is #if 0 and the option was disabled
        in 530c13c5401c.

    Sponsored by:   The FreeBSD Foundation (commit)
    PR:             285413
    MFC after:      3 days
    Reviewed by:    ziaee
    Differential Revision: https://reviews.freebsd.org/D49365

 usr.sbin/wlanstats/main.c      |  2 +-
 usr.sbin/wlanstats/wlanstats.8 | 19 +++++++++----------
 2 files changed, 10 insertions(+), 11 deletions(-)