summaryrefslogtreecommitdiff
path: root/package/busybox/busybox-1.17.0/busybox-1.17.0-top.patch
blob: 84c91f34a818ef26333248e9c55d79db23bca96a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff -urpN busybox-1.17.0/procps/top.c busybox-1.17.0-top/procps/top.c
--- busybox-1.17.0/procps/top.c	2010-06-24 04:40:43.000000000 +0200
+++ busybox-1.17.0-top/procps/top.c	2010-07-19 00:27:04.000000000 +0200
@@ -686,10 +686,10 @@ static int topmem_sort(char *a, char *b)
 	n = offsetof(topmem_status_t, vsz) + (sort_field * sizeof(mem_t));
 	l = *(mem_t*)(a + n);
 	r = *(mem_t*)(b + n);
-//	if (l == r) {
-//		l = a->mapped_rw;
-//		r = b->mapped_rw;
-//	}
+	if (l == r) {
+		l = ((topmem_status_t*)a)->dirty;
+		r = ((topmem_status_t*)b)->dirty;
+	}
 	/* We want to avoid unsigned->signed and truncation errors */
 	/* l>r: -1, l=r: 0, l<r: 1 */
 	n = (l > r) ? -1 : (l != r);