I'd like to add an option to display fmt.
Before doing so, make a function for displaing info for ease of refactoring.
Added kyua test cases.
Details
- Reviewers
mckusick delphij markj - Group Reviewers
manpages - Commits
- rGf126d349810f: Add -F option to sysctl(8) to display sysctl format.
% make install, etc...
% kyua test -k /usr/tests/Kyuafile sbin/sysctl
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sbin/sysctl/sysctl.c | ||
---|---|---|
991 | i is assigned but not used. I think it's quite likely that this sysctl call would always succeed as buf is sufficiently large, so if I was you I'd check the return value or maybe convert it to an assertion here. |
sbin/sysctl/sysctl.c | ||
---|---|---|
1133 | Looking at how another sysctl failure is handled, it silently skips printing. I suppose this is for -a, all option. I will follow the same error handling. |
Have you run mandoc -Tlint and igor on the manual page?
At the very least, the latter would hint that you need to bump .Dd :)
sbin/sysctl/sysctl.8 | ||
---|---|---|
105–106 | Also, I'm not sure "structured" is the best word. Maybe "compound"? |
- Bump the date, use "struct" as referenced in other parts of man sysctl, and give few examples of struct types.
- Bump the date, use "struct" as referenced in other parts of man sysctl, and give few examples of struct types.
sbin/sysctl/sysctl.8 | ||
---|---|---|
105–106 | I didn't realize your suggested changes in the first round of changes. When I looked at lower pages of sysctl.8, I found 'struct' and used it. |
Manual page language looks good to me. Can't speak about source code or consistency between them.
sbin/sysctl/sysctl.8 | ||
---|---|---|
105–106 | No, "struct" is fine for consistency, I think. |