]> granicus.if.org Git - procps-ng/commitdiff
library: change misnamed VSIZE_PGS item to VSIZE_BYTES
authorJim Warner <james.warner@comcast.net>
Thu, 28 Jul 2022 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Mon, 1 Aug 2022 12:12:47 +0000 (22:12 +1000)
Gosh this particular flaw originated way back in 2015.

[ that was when we burdened a caller with additional ]
[ responsibilities for 'stacks_alloc', 'stacks_fill' ]
[ and 'stacks_dealloc'. damn implementation details. ]

Reference(s):
. Aug, 2015 - introduced<pids> api
commit 7e6a371d8a36b250a2edddff9f5d059640b8132e

Signed-off-by: Jim Warner <james.warner@comcast.net>
proc/pids.c
proc/pids.h

index 3f9b9457e6763946eefe9af4421a752c59d3995f..0d88313953b99c7a4d0a5a4e981ea868c5c3f6ee 100644 (file)
@@ -302,7 +302,7 @@ REG_set(VM_SIZE,          ul_int,  vm_size)
 REG_set(VM_STACK,         ul_int,  vm_stack)
 REG_set(VM_SWAP,          ul_int,  vm_swap)
 setDECL(VM_USED)        { (void)I; R->result.ul_int = P->vm_swap + P->vm_rss; }
-REG_set(VSIZE_PGS,        ul_int,  vsize)
+REG_set(VSIZE_BYTES,      ul_int,  vsize)
 setDECL(WCHAN_NAME)     { freNAME(str)(R); if (!(R->result.str = strdup(lookup_wchan(P->tid)))) I->seterr = 1;; }
 
 #undef setDECL
@@ -593,7 +593,7 @@ static struct {
     { RS(VM_STACK),          f_status,   NULL,      QS(ul_int),    0,        TS(ul_int)  },
     { RS(VM_SWAP),           f_status,   NULL,      QS(ul_int),    0,        TS(ul_int)  },
     { RS(VM_USED),           f_status,   NULL,      QS(ul_int),    0,        TS(ul_int)  },
-    { RS(VSIZE_PGS),         f_stat,     NULL,      QS(ul_int),    0,        TS(ul_int)  },
+    { RS(VSIZE_BYTES),       f_stat,     NULL,      QS(ul_int),    0,        TS(ul_int)  },
     { RS(WCHAN_NAME),        0,          FF(str),   QS(str),       0,        TS(str)     }, // oldflags: tid already free
 };
 
index 13b57bde1005e50534bf036e50bda3aae4dd15be..60df41333d477320b386d02fecfc3b6110181cfe 100644 (file)
@@ -185,7 +185,7 @@ enum pids_item {
     PIDS_VM_STACK,          //   ul_int        status: VmStk
     PIDS_VM_SWAP,           //   ul_int        status: VmSwap
     PIDS_VM_USED,           //   ul_int        derived from status: VmRSS + VmSwap
-    PIDS_VSIZE_PGS,         //   ul_int        stat: vsize
+    PIDS_VSIZE_BYTES,       //   ul_int        stat: vsize
     PIDS_WCHAN_NAME         //      str        wchan
 };
                             //              *  while these are all expressed as seconds, each can be