Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hwpmc(4): instead of manual edition, use sysrc(8) #785

Closed
wants to merge 3 commits into from

Conversation

grahamperrin
Copy link
Contributor

Exemplifying safe use of sysrc(8) has become commonplace in documentation such as the FreeBSD Handbook.

@grahamperrin

This comment was marked as outdated.

Copy link
Contributor

@igalic igalic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bsdimp
Copy link
Member

bsdimp commented Jul 1, 2023

Looks good to me...
But do you really need the "" in this case? they aren't passed through to the sysrc command and module names never have spaces or globbing characters

@igalic
Copy link
Contributor

igalic commented Jul 1, 2023

Looks good to me... But do you really need the "" in this case? they aren't passed through to the sysrc command and module names never have spaces or globbing characters

good point actually, sysrc correctly quotes by itself

share/man/man4/hwpmc.4 Outdated Show resolved Hide resolved
Addition of a single alphanumeric value does not require enclosing quotation marks.

Co-authored-by: Mina Galić <me+github@igalic.co>
@grahamperrin
Copy link
Contributor Author

grahamperrin commented Jul 2, 2023

Thank you both.

#785 (comment)

… do you really need the "" in this case? …

Side notes, for a future pull request for the manual page for sysrc(8):

  • content of the EXAMPLES section is not consistent with direction given (duplicated) in two preceding sections; and formatting of examples within each of those two is inconsistent both within the section, and when compared with the EXAMPLES section
  • some examples are misplaced.

(Now, I realise why I nearly always needed to look at the page two or three times (or look away) to make sense of, and find, the required knowledge.)

Postscript

for a future pull request

Instead:

share/man/man4/hwpmc.4 Show resolved Hide resolved
freebsd-git pushed a commit that referenced this pull request Jul 8, 2023
Exemplifying safe use of sysrc(8) has become commonplace in
documentation such as the FreeBSD Handbook. Encourage its use.

Consistency: 'the driver' (not 'this driver').

Co-authored-by: Mina Galić <me+github@igalic.co>
Reviewed-by:    imp, Mina Galić <me+github@igalic.co>
Approved by:    imp
MFC after:      3 days
Pull-request:   #785
@grahamperrin grahamperrin deleted the patch-1 branch July 8, 2023 06:41
@grahamperrin
Copy link
Contributor Author

% git -C /usr/src branch
  main
  pkg-stage
  prefer-ee
  releng/13.1
  releng/13.2
  stable/12
* stable/13
% git -C /usr/src cherry-pick -x 666c54d --edit
Auto-merging share/man/man4/hwpmc.4
CONFLICT (content): Merge conflict in share/man/man4/hwpmc.4
error: could not apply 666c54d12ec9... hwpmc(4): instead of manual edition, use sysrc(8)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
% 

I dealt with merge conflicts once or twice in the past, but (sorry) recently I just haven't got the head space for anything beyond Git basics. If someone else would like to MFC, please go ahead, thanks.

https://github.com/freebsd/freebsd-src/commits/stable/13/share/man/man4/hwpmc.4


Side note:

https://github.com/refined-github/refined-github/blob/main/source/features/list-prs-for-file.tsx

  • list-prs-for-file

Alerts you if the current file is altered by an open PR.

freebsd-git pushed a commit that referenced this pull request Jul 28, 2023
Exemplifying safe use of sysrc(8) has become commonplace in
documentation such as the FreeBSD Handbook. Encourage its use.

Consistency: 'the driver' (not 'this driver').

Co-authored-by: Mina Galić <me+github@igalic.co>
Reviewed-by:    imp, Mina Galić <me+github@igalic.co>
Approved by:    imp
MFC after:      3 days
Pull-request:   #785

(cherry picked from commit 666c54d)
@grahamperrin
Copy link
Contributor Author

First: thanks to Mina.


Above, #785 (comment)

… Git basics …

Looking at (tcsh) history across multiple tabs, it's possible that I omitted a (basic) pull:

git -C /usr/src pull --ff-only freebsd stable/13

URLs
% git -C /usr/src config --list | grep url
remote.origin.url=https://github.com/grahamperrin/freebsd-src.git
remote.upstream.url=https://github.com/freebsd/freebsd-src.git
remote.freebsd.url=https://git.freebsd.org/src.git
remote.freebsd.pushurl=git@repo.freebsd.org:src.git
% 

I can't imagine why the .Dd date line was treated as conflict in #795, but not as a conflict here in #785

Most recent history
  …
  2036  8:50    git -C /usr/src reset --hard HEAD
  2037  8:50    git -C /usr/src pull --ff-only freebsd stable/13
  2038  8:51    git -C /usr/src cherry-pick -x 3541d90 --edit
  2039  8:51    nano /usr/src/lib/geom/part/gpart.8
  2040  8:52    git -C /usr/src status
  2041  8:53    git -C /usr/src add lib/geom/part/gpart.8 && git -C /usr/src commit
  2042  8:57    git -C /usr/src show
  2043  8:57    git -C /usr/src push freebsd stable/13
  2044  9:14    git -C /usr/src cherry-pick -x 666c54d --edit
  2045  9:17    git -C /usr/src show
  2046  9:17    git -C /usr/src push freebsd stable/13

bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Sep 6, 2023
Exemplifying safe use of sysrc(8) has become commonplace in
documentation such as the FreeBSD Handbook. Encourage its use.

Consistency: 'the driver' (not 'this driver').

Co-authored-by: Mina Galić <me+github@igalic.co>
Reviewed-by:    imp, Mina Galić <me+github@igalic.co>
Approved by:    imp
MFC after:      3 days
Pull-request:   freebsd/freebsd-src#785
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants