Changed to eliminate the upper limit of command length displayed by "-a" and expand to match terminal width
Details
Details
- Reviewers
eadler gnn - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rS336028: Changed to eliminate the upper limit of command length displayed
on A terminal:
% touch 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 % cat - 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
on B terminal:
% top -a -d 1
result:
original top: % top -a -d 1 | grep cat 879 daichi 1 20 0 11M 3M piperd 1 0:00 0.00% grep cat 852 daichi 1 20 0 11M 2M ttyin 1 0:00 0.00% [cat] % patched top (terminal width is 80): % top -a -d 1 | grep cat 9835 daichi 1 20 0 11M 3M piperd 0 0:00 0.00% grep cat 9830 daichi 1 20 0 11M 2M ttyin 1 0:00 0.00% cat - 0123 % patched top (terminal width is 512): % top -a -d 1 | grep cat 9860 daichi 1 20 0 11M 3M piperd 0 0:00 0.00% grep cat 9830 daichi 1 20 0 11M 2M ttyin 1 0:00 0.00% cat - 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 01234567890123456789012345678901 % patched top (terminal width is 1128): % top -a -d 1 | grep cat 9862 daichi 1 20 0 11M 3M piperd 1 0:00 0.00% grep cat 9830 daichi 1 20 0 11M 2M ttyin 1 0:00 0.00% cat - 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 012345678901234567890123456789012345678901 %
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
usr.bin/top/machine.c | ||
---|---|---|
874 | Where does screen_width come from? |
Comment Actions
I'd like to move away from using static sizes and limits. This is fine as a stop-gap, but please consider changes that remove such static sizes.
Comment Actions
Follow Eadler's advice and abolish static value. However, it is still in the early stage. More testing is necessary. Please test it.
Comment Actions
Part of the patch overlapped with kib's committed patch (https://svnweb.freebsd.org/base?view=revision&revision=335937, https://reviews.freebsd.org/D16111), so I updated the patch.