diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2023-02-13 06:39:04 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2023-02-16 04:57:54 +0000 |
commit | 6431b5ab6bba2dbf7a22c00e6a3ce2afd1bde436 (patch) | |
tree | f4dbb5b0f30a962c36033fe6bd646723e132b8e3 | |
parent | a80643d2a94fc55b7e2567d63d66c0c3cd17a830 (diff) | |
download | src-6431b5ab6bba2dbf7a22c00e6a3ce2afd1bde436.tar.gz src-6431b5ab6bba2dbf7a22c00e6a3ce2afd1bde436.zip |
top: fix sorting by pid (-o pid)
The 'pid' order was added, but the equivalent comparator was not back in
8b800d3af2d8c ("Add the PID column to the list of sort keys.").
`ordernames` indices need to match `compares` indices in order for this
to work.
A future commit will restructure all of this to make it less error prone
going forward (see D37083).
MFC after: 3 days
Reviewed by: pstef (D37083)
(cherry picked from commit deb63adf945d446ed91a9d84124c71f15ae571d1)
-rw-r--r-- | usr.bin/top/machine.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 6116a06bb28b..d41b3e4f6b74 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -1552,6 +1552,7 @@ int (*compares[])(const void *arg1, const void *arg2) = { compare_ivcsw, compare_jid, compare_swap, + compare_pid, NULL }; |