projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
0d6e2d6
)
ps - Fix sorting mistake in recent commits
author
Matthew Dillon <dillon@apollo.backplane.com>
Wed, 16 Feb 2011 22:32:43 +0000 (14:32 -0800)
committer
Matthew Dillon <dillon@apollo.backplane.com>
Wed, 16 Feb 2011 22:32:43 +0000 (14:32 -0800)
* qsort passes a pointer to the element, so its a KINFO** instead of
a KINFO*. Fix the indirection.
* Fixes weird default output sorting that was all wrong.
bin/ps/ps.c
patch
|
blob
|
blame
|
history
diff --git
a/bin/ps/ps.c
b/bin/ps/ps.c
index
e4dc444
..
d1a753d
100644
(file)
--- a/
bin/ps/ps.c
+++ b/
bin/ps/ps.c
@@
-600,9
+600,9
@@
saveuser(KINFO *ki)
static int
pscomp(const void *arg_a, const void *arg_b)
{
+ const KINFO *a = *(KINFO * const *)arg_a;
+ const KINFO *b = *(KINFO * const *)arg_b;
int i;
- const KINFO *a = arg_a;
- const KINFO *b = arg_b;
#define VSIZE(k) (KI_PROC(k, vm_dsize) + KI_PROC(k, vm_ssize) + \
KI_PROC(k, vm_tsize))