]> granicus.if.org Git - procps-ng/commitdiff
top: ensure previously saved rcfile honored completely
authorJim Warner <james.warner@comcast.net>
Sun, 28 Sep 2014 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Sun, 28 Sep 2014 22:22:13 +0000 (08:22 +1000)
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 <james.warner@comcast.net>
top/top.c

index 39c85455601b111533c057f0192cc7163cb7650c..985a8bc8004ab69bfd6497323013cdae8d25d4bf 100644 (file)
--- 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)