Details
Details
- Reviewers
kfv
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 79353 Build 76236: arc lint + arc unit
Event Timeline
| usr.sbin/sysrc/sysrc | ||
|---|---|---|
| 71 | Why are we passing "$@" "$pgm" here? I assume it’s an oversight, but please educate me if it’s intentional. Also, what do you think about introducing an err() helper to dedup the shared block in die() and usage()? Something like: err()
{
[ "$1" ] || return
local fmt="$1"
shift 1 # fmt
f_err "%s: $fmt\n" "$pgm" "$@"
}Then die() and usage() would each just start with err "$@". | |
| usr.sbin/sysrc/sysrc | ||
|---|---|---|
| 71 | Good catch on the "$pgm" and "$@" being reversed. As for err(), seems like a decent suggestion, and I have no issues with adopting that change into the next update | |
Comment Actions
Add err() suggested by kfv (in-turn fixing usage()'s improper ordering
of printf varargs)