summaryrefslogtreecommitdiff
path: root/bin/ps/keyword.c
diff options
context:
space:
mode:
authorLawrence Teo <lteo@cvs.openbsd.org>2014-03-20 03:38:34 +0000
committerLawrence Teo <lteo@cvs.openbsd.org>2014-03-20 03:38:34 +0000
commit82ffb78d0d9b48c4a1768308325516684674e21e (patch)
tree629431ab9d8cbc59090eb2530a20115893ce6a1c /bin/ps/keyword.c
parent753a0b05467efb555562839ced9fe57288f67f0b (diff)
Move the "minflt" entry to the correct spot in the var array so that all
keywords are sorted in ascending order again. This fixes a bug where ps(1) thought that "minflt" was an invalid keyword. This bug was introduced when the "maxrss" keyword was accidentally added to the array after "minflt" instead of before, so the bsearch(3)-based keyword lookup could never find "minflt". ok deraadt@ guenther@ millert@ tedu@
Diffstat (limited to 'bin/ps/keyword.c')
-rw-r--r--bin/ps/keyword.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c
index 13eb919d29f..7028d1fbd51 100644
--- a/bin/ps/keyword.c
+++ b/bin/ps/keyword.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: keyword.c,v 1.39 2013/10/24 06:21:47 guenther Exp $ */
+/* $OpenBSD: keyword.c,v 1.40 2014/03/20 03:38:33 lteo Exp $ */
/* $NetBSD: keyword.c,v 1.12.6.1 1996/05/30 21:25:13 cgd Exp $ */
/*-
@@ -118,8 +118,8 @@ VAR var[] = {
{"logname", "", "login"},
{"lstart", "STARTED", NULL, LJUST|USER, lstarted, 28},
{"majflt", "MAJFLT", NULL, USER, pvar, 4, 0, POFF(p_uru_majflt), UINT64, "lld"},
- {"minflt", "MINFLT", NULL, USER, pvar, 4, 0, POFF(p_uru_minflt), UINT64, "lld"},
{"maxrss", "MAXRSS", NULL, USER, pvar, 4, 0, POFF(p_uru_maxrss), UINT64, "lld"},
+ {"minflt", "MINFLT", NULL, USER, pvar, 4, 0, POFF(p_uru_minflt), UINT64, "lld"},
{"msgrcv", "MSGRCV", NULL, USER, pvar, 4, 0, POFF(p_uru_msgrcv), UINT64, "lld"},
{"msgsnd", "MSGSND", NULL, USER, pvar, 4, 0, POFF(p_uru_msgsnd), UINT64, "lld"},
{"ni", "", "nice"},