Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Feb 2023 03:34:52 GMT
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: cfd3bd04c245 - stable/13 - top: fix sorting by pid (-o pid)
Message-ID:  <202302160334.31G3Yq15043052@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=cfd3bd04c245889d339c4f7cb1e45c955537e3eb

commit cfd3bd04c245889d339c4f7cb1e45c955537e3eb
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2023-02-13 06:39:04 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-02-16 03:29:54 +0000

    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).
    
    Reviewed by:    pstef (D37083)
    
    (cherry picked from commit deb63adf945d446ed91a9d84124c71f15ae571d1)
---
 usr.bin/top/machine.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index 315c8be1a4c2..be667ec0e461 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -1567,6 +1567,7 @@ int (*compares[])(const void *arg1, const void *arg2) = {
 	compare_ivcsw,
 	compare_jid,
 	compare_swap,
+	compare_pid,
 	NULL
 };
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302160334.31G3Yq15043052>