From bf9f245cda47349b25ee02e943f872cdd230b842 Mon Sep 17 00:00:00 2001 From: gad Date: Wed, 23 Jun 2004 12:18:36 +0000 Subject: Avoid padding the value of "ucomm" when it is the last column in the line. Submitted by: Cyrille Lefevre --- bin/ps/print.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin/ps/print.c') diff --git a/bin/ps/print.c b/bin/ps/print.c index 0f2b14a..da8f2e0 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -180,7 +180,10 @@ ucomm(KINFO *k, VARENT *ve) VAR *v; v = ve->var; - (void)printf("%-*s", v->width, k->ki_p->ki_comm); + if (ve->next == NULL) /* last field, don't pad */ + (void)printf("%s", k->ki_p->ki_comm); + else + (void)printf("%-*s", v->width, k->ki_p->ki_comm); } void -- cgit v1.1