From 2883940819efb23fc882dd47de9d6267e3669551 Mon Sep 17 00:00:00 2001 From: jhb Date: Mon, 2 Jul 2012 20:08:11 +0000 Subject: Fix two layout bugs in the previous change: - Properly increase y_mem when per-CPU stats are enabled. - Update y_arc for per-CPU stats being enabled/disabled. MFC after: 3 days --- usr.bin/top/machine.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 1d6b907..6520ae7 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -263,6 +263,7 @@ update_layout(void) { y_mem = 3; + y_arc = 4; y_swap = 4 + arc_enabled; y_idlecursor = 5 + arc_enabled; y_message = 5 + arc_enabled; @@ -271,7 +272,8 @@ update_layout(void) Header_lines = 7 + arc_enabled; if (pcpu_stats) { - y_mem = ncpus - 1; + y_mem += ncpus - 1; + y_arc += ncpus - 1; y_swap += ncpus - 1; y_idlecursor += ncpus - 1; y_message += ncpus - 1; -- cgit v1.1