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
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 44060 Build 40948: arc lint + arc unit
Event Timeline
sbin/sysctl/sysctl.c | ||
---|---|---|
983 | 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 | ||
---|---|---|
1113 | 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 | ||
---|---|---|
102–103 ↗ | (On Diff #102286) | 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 | ||
---|---|---|
102–103 ↗ | (On Diff #102286) | 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 | ||
---|---|---|
102–103 ↗ | (On Diff #102286) | No, "struct" is fine for consistency, I think. |