]> granicus.if.org Git - procps-ng/commitdiff
ps: adapt to the newly added library smaps_rollup item
authorJim Warner <james.warner@comcast.net>
Wed, 16 Jun 2021 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@dropbear.xyz>
Thu, 17 Jun 2021 06:42:58 +0000 (16:42 +1000)
In that commit referenced below, a new field was added
to the ps program which required adding 2 newlib items
together. Such a need is now satisfied by the library.

So, this commit will just adapt ps for that provision.

Reference(s):
commit e782b1d85989a9d27474264d4d65ffe1c485bdc9

Signed-off-by: Jim Warner <james.warner@comcast.net>
ps/common.h
ps/global.c
ps/output.c

index 99735cd79145fd89ff26cc0f179a7173b29e45a9..3a149d0694c3d4a3fce7e54047fdc1683b3d00aa 100644 (file)
@@ -144,8 +144,7 @@ makEXT(SIGCATCH)
 makEXT(SIGIGNORE)
 makEXT(SIGNALS)
 makEXT(SIGPENDING)
-makEXT(SMAP_PRV_CLEAN)
-makEXT(SMAP_PRV_DIRTY)
+makEXT(SMAP_PRV_TOTAL)
 makEXT(SMAP_PSS)
 makEXT(STATE)
 makEXT(SUPGIDS)
index d812991b06828db2ba8d489763bc24bd9a68947d..198a98acd8408bb2913b31a7ded5966b21be72eb 100644 (file)
@@ -131,8 +131,7 @@ makREL(SIGCATCH)
 makREL(SIGIGNORE)
 makREL(SIGNALS)
 makREL(SIGPENDING)
-makREL(SMAP_PRV_CLEAN)
-makREL(SMAP_PRV_DIRTY)
+makREL(SMAP_PRV_TOTAL)
 makREL(SMAP_PSS)
 makREL(STATE)
 makREL(SUPGIDS)
index 350de1ae25f768db3301ce48a3e7cc12bbc9ae93..b2c1f011344cdd0fb8254e504adf9696979fc939 100644 (file)
@@ -1123,9 +1123,8 @@ setREL1(SIGCATCH)
 }
 
 static int pr_uss(char *restrict const outbuf, const proc_t *restrict const pp){
-setREL2(SMAP_PRV_CLEAN, SMAP_PRV_DIRTY)
-  return snprintf(outbuf, COLWID, "%lu",
-         rSv(SMAP_PRV_CLEAN, ul_int, pp) + rSv(SMAP_PRV_DIRTY, ul_int, pp));
+setREL1(SMAP_PRV_TOTAL)
+  return snprintf(outbuf, COLWID, "%lu", rSv(SMAP_PRV_TOTAL, ul_int, pp));
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -1814,7 +1813,7 @@ static const format_struct format_array[] = { /*
 {"userns",    "USERNS",  pr_userns,        PIDS_NS_USER,            10,    LNX,  ET|RIGHT},
 {"usertime",  "USER",    pr_nop,           PIDS_noop,                4,    DEC,  ET|RIGHT},
 {"usrpri",    "UPR",     pr_nop,           PIDS_noop,                3,    DEC,  TO|RIGHT}, /*upr*/
-{"uss",       "USS",     pr_uss,           PIDS_SMAP_PRV_CLEAN,      5,    XXX,  PO|RIGHT},
+{"uss",       "USS",     pr_uss,           PIDS_SMAP_PRV_TOTAL,      5,    XXX,  PO|RIGHT},
 {"util",      "C",       pr_c,             PIDS_extra,               2,    SGI,  ET|RIGHT}, // not sure about "C"
 {"utime",     "UTIME",   pr_nop,           PIDS_TICS_USER,           6,    LNx,  ET|RIGHT},
 {"utsns",     "UTSNS",   pr_utsns,         PIDS_NS_UTS,             10,    LNX,  ET|RIGHT},