ps: enable sort by etimes

ps has two columns showing the same data which is elapsed time, just
the format is changed:
 etimes - elapsed time in seconds
 etime  - elapsed time in DD-hh:mm:ss

ps used to only sort by etime but not etimes, by making etimes
and alias of etime for sorting both flags work.

References:
 https://bugs.debian.org/794619

Signed-off-by: Craig Small <csmall@enc.com.au>
This commit is contained in:
Craig Small
2015-08-06 22:08:13 +10:00
parent 3da298c1d6
commit 313f936739
2 changed files with 2 additions and 1 deletions

View File

@@ -1467,7 +1467,7 @@ static const format_struct format_array[] = {
{"environ","ENVIRONMENT",pr_nop, sr_nop, 11, ENV, LNx, PO|UNLIMITED},
{"esp", "ESP", pr_esp, sr_kstk_esp, 8, 0, LNX, TO|RIGHT},
{"etime", "ELAPSED", pr_etime, sr_etime, 11, 0, U98, ET|RIGHT}, /* was 7 wide */
{"etimes", "ELAPSED", pr_etimes, sr_nop, 7, 0, BSD, ET|RIGHT}, /* FreeBSD */
{"etimes", "ELAPSED", pr_etimes, sr_etime, 7, 0, BSD, ET|RIGHT}, /* FreeBSD */
{"euid", "EUID", pr_euid, sr_euid, 5, 0, LNX, ET|RIGHT},
{"euser", "EUSER", pr_euser, sr_euser, 8, USR, LNX, ET|USER},
{"f", "F", pr_flag, sr_flags, 1, 0, XXX, ET|RIGHT}, /*flags*/