From b0767bd391da2c868ccabe1f0213e1593f1e2eed Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Sun, 28 Sep 2014 00:00:00 -0500 Subject: [PATCH] top: ensure previously saved rcfile honored completely When startup defaults were changed users with existing rcfiles would likely find their previous configuration was not being honored in all respects. The disparities involved Graphs modes and Summary/Task memory scaling. This patch simply restores what was always intended as the proper behavior for previously saved config files. References(s): https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762928 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=762947 . new startup defaults commit 8ef6cd91fc5df6372a93bc4a37cbad34ead9654e Signed-off-by: Jim Warner --- top/top.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/top/top.c b/top/top.c index 39c85455..985a8bc8 100644 --- a/top/top.c +++ b/top/top.c @@ -3524,8 +3524,9 @@ static void configs_read (void) { case 'g': // from 3.3.4 thru 3.3.8 scat(w->rc.fieldscur, RCF_PLUS_H); case 'h': // this is release 3.3.9 - /* w->rc.graph_cpus = 0; */// for documentation only, since - /* w->rc.graph_mems = 0; */// DEF_RCFILE zeroes them for us + w->rc.graph_cpus = w->rc.graph_mems = 0; + // these next 2 are really global, but best documented here + Rc.summ_mscale = Rc.task_mscale = SK_Kb; case 'i': // actual RCF_VERSION_ID default: // and a future version? if (strlen(w->rc.fieldscur) != sizeof(DEF_FIELDS) - 1)