ps: enabled sort with 'utilization' related specifiers

When %CUU was added, in the commit referenced below, I
stated that 4 similar specifiers already existed. Well
I misspoke since there is actually 5 including 'util'.

Each of those fields had no sort capability. Since the
values are dynamically calculated, they were forced to
use 'PIDS_extra' as the format_array 'sr' designation.

Now each will use 'PIDS_UTILIZATION' and be sort-able.

[ yes, sometimes the calculated values could contain ]
[ reaped children while the sort field does not. but ]
[ such disparity depends on obscure bsd/gnu options. ]

Reference(s):
. Mar, 2022 - added %CUU
commit 2ac72e2e80

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2022-03-06 00:00:00 -06:00
committed by Craig Small
parent e4e7991a26
commit 6490349e64
2 changed files with 13 additions and 8 deletions

View File

@@ -61,6 +61,11 @@
chkREL(e1) chkREL(e2) chkREL(e3) \
return 0; \
} }
#define setREL4(e1,e2,e3,e4) { \
if (!outbuf) { \
chkREL(e1) chkREL(e2) chkREL(e3) chkREL(e4) \
return 0; \
} }
extern struct pids_info *Pids_info;
extern enum pids_item *Pids_items;