ps: adapt to the newly added library smaps_rollup item

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 e782b1d859

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner 2021-06-16 00:00:00 -05:00 committed by Craig Small
parent 3e94210fe4
commit bbebf29dd1
3 changed files with 5 additions and 8 deletions

View 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)

View 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)

View 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},