From bbebf29dd157d0368e7e00eb39ae254fbba898e8 Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Wed, 16 Jun 2021 00:00:00 -0500 Subject: [PATCH] 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 e782b1d85989a9d27474264d4d65ffe1c485bdc9 Signed-off-by: Jim Warner --- ps/common.h | 3 +-- ps/global.c | 3 +-- ps/output.c | 7 +++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ps/common.h b/ps/common.h index 99735cd7..3a149d06 100644 --- a/ps/common.h +++ b/ps/common.h @@ -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) diff --git a/ps/global.c b/ps/global.c index d812991b..198a98ac 100644 --- a/ps/global.c +++ b/ps/global.c @@ -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) diff --git a/ps/output.c b/ps/output.c index 350de1ae..b2c1f011 100644 --- a/ps/output.c +++ b/ps/output.c @@ -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},