Bug 281597 - [PATCH] Fix errors in .2 pages
Summary: [PATCH] Fix errors in .2 pages
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Mitchell Horne
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-20 02:01 UTC by Graham Percival
Modified: 2024-11-04 15:57 UTC (History)
3 users (show)

See Also:


Attachments
manuals: Fix errors in .2 pages (3.22 KB, patch)
2024-09-20 02:01 UTC, Graham Percival
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Percival 2024-09-20 02:01:50 UTC
Created attachment 253673 [details]
manuals: Fix errors in .2 pages

These were reported by `mandoc -T lint ...` as errors (and manually reviewed).

In swapon.2, the syntax errors caused two headers to not be displayed, which is a rather unfortunate error.

None of the other errors seem to affect the way that man(1) displays the pages, so I'm not certain why mandoc reports them as errors rather than warnings or style.  But there's certainly no harm in fixing them!
Comment 1 Mitchell Horne freebsd_committer freebsd_triage 2024-09-20 14:30:31 UTC
LGTM, thanks. I will land this.
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-09-20 14:37:36 UTC
A commit in branch main references this bug:

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

commit 650056363baddb83c61c85b0539ee536f3d4b56c
Author:     Graham Percival <gperciva@tarsnap.com>
AuthorDate: 2024-09-20 01:54:39 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2024-09-20 14:37:02 +0000

    manuals: Fix errors in .2 pages

    These were reported by `mandoc -T lint ...` as errors.

    fhlink.2, fhreadlink.2: remove unneeded block closing.

    getfh.2, procctl.2: add necessary block closing.

    ptrace.2: -width only takes one argument.

    swapon.2: <sys/vmparam.h> and <vm/swap_pager.h> weren't being displayed,
        because .It is for a list item whereas .In is for included files.
        Also, we want a blank line between <sys/ > headers and the other
        one.

    Signed-off-by:  Graham Percival <gperciva@tarsnap.com>
    PR:             281597
    Reviewed by:    mhorne
    Sponsored by:   Tarsnap Backup Inc.

 lib/libsys/fhlink.2     | 1 -
 lib/libsys/fhreadlink.2 | 2 --
 lib/libsys/getfh.2      | 1 +
 lib/libsys/procctl.2    | 1 +
 lib/libsys/ptrace.2     | 2 +-
 lib/libsys/swapon.2     | 5 +++--
 6 files changed, 6 insertions(+), 6 deletions(-)
Comment 3 Graham Percival 2024-09-20 23:12:37 UTC
Thank you!  That was my first contribution to FreeBSD.  I have two questions about the process:

1) Now that the fix is in the tree, should I mark this as closed?  or should I leave that for a FreeBSD person to do?

2) A week ago, I submitted some man fixes to
https://github.com/freebsd/freebsd-src/pull/1417

Should I close that PR and resubmit via bugzilla?  I'm happy to do whatever's easiest for the team.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2024-09-21 01:55:45 UTC
(In reply to Graham Percival from comment #3)
There are committers who prefer Pull Requests, some who prefer Phabricator, and some who prefer Bugzilla.  So it may depend on which committer shows interest.
Comment 5 Mitchell Horne freebsd_committer freebsd_triage 2024-09-24 15:23:34 UTC
(In reply to Graham Percival from comment #3)

As Mark says, everyone has their personal preference.

I was able to land this one easily only because the patch was simple and correct. It is very difficult to effectively review/communicate needed changes to bugzilla submissions. So for me, a GitHub pull request is a much better method for any future changes, especially non-trivial or content changes.

I am generally interested in merging man page improvements, and will attempt to handle GitHub PRs in a timely manner if you tag me (mhorne).

Best,
Mitchell
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-11-04 15:57:49 UTC
A commit in branch stable/14 references this bug:

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

commit 3609e56813b4322660c9f4a882f7336d57b7d723
Author:     Graham Percival <gperciva@tarsnap.com>
AuthorDate: 2024-09-20 01:54:39 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2024-11-04 15:56:24 +0000

    manuals: Fix errors in .2 pages

    These were reported by `mandoc -T lint ...` as errors.

    fhlink.2, fhreadlink.2: remove unneeded block closing.

    getfh.2, procctl.2: add necessary block closing.

    ptrace.2: -width only takes one argument.

    swapon.2: <sys/vmparam.h> and <vm/swap_pager.h> weren't being displayed,
        because .It is for a list item whereas .In is for included files.
        Also, we want a blank line between <sys/ > headers and the other
        one.

    Signed-off-by:  Graham Percival <gperciva@tarsnap.com>
    PR:             281597
    Reviewed by:    mhorne
    Sponsored by:   Tarsnap Backup Inc.

    (cherry picked from commit 650056363baddb83c61c85b0539ee536f3d4b56c)

 lib/libc/sys/fhlink.2     | 1 -
 lib/libc/sys/fhreadlink.2 | 2 --
 lib/libc/sys/getfh.2      | 1 +
 lib/libc/sys/procctl.2    | 1 +
 lib/libc/sys/ptrace.2     | 2 +-
 lib/libc/sys/swapon.2     | 5 +++--
 6 files changed, 6 insertions(+), 6 deletions(-)