summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-09-16 20:19:51 +0000
committerjmallett <jmallett@FreeBSD.org>2002-09-16 20:19:51 +0000
commitfece93f6bd7aed95bbd6edfb87765c3fcdbfedd5 (patch)
tree753510a45014ce84706fa2914051fe1c649cbf01 /bin/ps/print.c
parent939d493b8a013b9f890ed54d5f8df60c3bc01062 (diff)
downloadFreeBSD-src-fece93f6bd7aed95bbd6edfb87765c3fcdbfedd5.zip
FreeBSD-src-fece93f6bd7aed95bbd6edfb87765c3fcdbfedd5.tar.gz
Perform keyword.c:1.27 properly, implement -orss in the New World Order of
ps(1) formatting, using pgtok() to get the value in K, rather than printing it in pages. This is consistent with behaviour before keyword.c:1.26 (et al) which exists in STABLE today, and which uses the same metric as VSZ. Submitted by: bde
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r--bin/ps/print.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index acbb9cc..79ca1eb 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -317,6 +317,16 @@ s_runame(KINFO *k)
return (strlen(user_from_uid(k->ki_p->ki_ruid, 0)));
}
+
+void
+rss(KINFO *k, VARENT *ve)
+{
+ VAR *v;
+
+ v = ve->var;
+ (void)printf("%*ld", v->width, (long)ps_pgtok(k->ki_p->ki_rssize));
+}
+
void
tdev(KINFO *k, VARENT *ve)
{
OpenPOWER on IntegriCloud