summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r--bin/ps/print.c5
1 files changed, 4 insertions, 1 deletions
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
OpenPOWER on IntegriCloud