For reasons unknown, procstat subcommands typically display the command
in a 16+overflow column format. However, the command may be up to
MAXCOMLEN (19) characters long causing the column to spill into the next
one. Since there's plenty of room in the auxv case, bump the column
width up to 19 to avoid this issue. While this is a format change 1)
users who want to parse the data should use libxo output and 2) this
makes it possible to parse reliably with cut.
Details
Details
- Reviewers
trociny markj jhb - Commits
- rG8f9f7b4a427f: procstat auxv: widen COMM column to MAXCOMLEN
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 53978 Build 50868: arc lint + arc unit
Event Timeline
usr.bin/procstat/procstat_auxv.c | ||
---|---|---|
56 | Hmm, can you write "%-*s" and pass MAXCOMLEN as a parameter? It's just a suggestion, I'm not sure it's worth the effort. |
usr.bin/procstat/procstat_auxv.c | ||
---|---|---|
56 | My conclusion was "no" or at least not usefully because of the e:command/%-19s/%s below where one case would consume it and another not. Maybe I could stringify the macro value, but that doesn't seem super readable :( |