Bug 279546 - ctladm.8 is inconsistent about "ctladm port"'s "-l" option
Summary: ctladm.8 is inconsistent about "ctladm port"'s "-l" option
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL: https://reviews.freebsd.org/D45522
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-05 19:48 UTC by Alan Somers
Modified: 2024-09-19 20:32 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer freebsd_triage 2024-06-05 19:48:00 UTC
Originally, "ctladm port" had a "-l" option for "list".  In commit 9c887a4f86f5fd4f51c23443dc8435e52783a782, mav removed the description for that option from the itemized list of options and from the summary of the port subcommand's options. But he did not remove mention of that option from a paragraph-form description of the subcommand ("Either get a list of frontend ports .Pq Fl l ,").  Nor did he actually remove the option from the command itself in ctladm.c.

Should we finish removing the option, or restore it to the documentation?
Comment 1 Alan Somers freebsd_committer freebsd_triage 2024-06-05 19:49:19 UTC
Similarly, the "-x" and "-q" options got removed from the man page in the same commit, but are still present in the command.
Comment 2 Alexander Motin freebsd_committer freebsd_triage 2024-06-05 20:29:49 UTC
It is hard to recall why have I done that 9 years ago, but it seems `ctladm port -l` is equivalent to `ctladm portlist`.  And `-x` and `-q` arguments are useless  without `-l`.  I guess I could keep it in the code to not break existing scripts, while remove from documentation to make it more clear.  May be I was going to clean up code later, but it just never happened.  I don't think I'd like restoring the documentation, preferring probably further cleanup.  Whether to remove the actual code, I don't have preference.
Comment 3 Alan Somers freebsd_committer freebsd_triage 2024-06-05 21:09:14 UTC
That sounds good.  Let's remove it completely from the man page.  From the binary, let's recognize it but print a warning and remove in FreeBSD 16.  I can submit a phabricator patch for this.
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-06-18 21:14:31 UTC
A commit in branch main references this bug:

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

commit bb95fbf634b3459363a136899e9b241a2f6c49cd
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2024-06-06 21:09:38 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2024-06-18 21:13:44 +0000

    ctladm: deprecate the undocumented "port -l" option

    It was mostly removed from the man page in
    9c887a4f86f5fd4f51c23443dc8435e52783a782, but left in the command.
    Fully remove it from the man page, and warn if anybody uses it.  Remove
    it entirely for FreeBSD 16.

    PR:             279546
    MFC after:      2 weeks
    Reviewed by:    mav
    Sponsored by:   Axcient
    Differential Revision: https://reviews.freebsd.org/D45522

 usr.sbin/ctladm/ctladm.8 |  5 +----
 usr.sbin/ctladm/ctladm.c | 29 +++++++++++++++++++----------
 2 files changed, 20 insertions(+), 14 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-09-19 20:08:02 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=95fbdf9df5b0918668517298d3ca77b65361b756

commit 95fbdf9df5b0918668517298d3ca77b65361b756
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2024-06-06 21:09:38 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2024-09-19 20:03:39 +0000

    ctladm: deprecate the undocumented "port -l" option

    It was mostly removed from the man page in
    9c887a4f86f5fd4f51c23443dc8435e52783a782, but left in the command.
    Fully remove it from the man page, and warn if anybody uses it.  Remove
    it entirely for FreeBSD 16.

    PR:             279546
    Reviewed by:    mav
    Sponsored by:   Axcient
    Differential Revision: https://reviews.freebsd.org/D45522

    (cherry picked from commit bb95fbf634b3459363a136899e9b241a2f6c49cd)

 usr.sbin/ctladm/ctladm.8 |  5 +----
 usr.sbin/ctladm/ctladm.c | 29 +++++++++++++++++++----------
 2 files changed, 20 insertions(+), 14 deletions(-)