diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2004-03-03 06:28:13 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2004-03-03 06:28:13 +0000 |
commit | 78397b3168f2f1f9e6ac55dda12aaa38928e5ede (patch) | |
tree | 287dad2d7975d29432d5d98446fc2e709f175d60 /sys/miscfs/procfs | |
parent | 378e258203b9bea61402c92b33a681a669dc3840 (diff) |
repair status by not repeating fields. fixes pr2101 from jim razmus
Diffstat (limited to 'sys/miscfs/procfs')
-rw-r--r-- | sys/miscfs/procfs/procfs_status.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/miscfs/procfs/procfs_status.c b/sys/miscfs/procfs/procfs_status.c index c736ec1ac52..5fb379cd861 100644 --- a/sys/miscfs/procfs/procfs_status.c +++ b/sys/miscfs/procfs/procfs_status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: procfs_status.c,v 1.6 2003/06/02 23:28:11 millert Exp $ */ +/* $OpenBSD: procfs_status.c,v 1.7 2004/03/03 06:28:12 tedu Exp $ */ /* $NetBSD: procfs_status.c,v 1.11 1996/03/16 23:52:50 christos Exp $ */ /* @@ -105,18 +105,19 @@ procfs_stat_gen(p, s, l) if (sess->s_ttyvp) { snprintf(ps, sizeof(ps), "%sctty", sep); sep = ","; + COUNTORCAT(s, l, ps, n); } - COUNTORCAT(s, l, ps, n); if (SESS_LEADER(p)) { snprintf(ps, sizeof(ps), "%ssldr", sep); sep = ","; + COUNTORCAT(s, l, ps, n); } - COUNTORCAT(s, l, ps, n); - if (*sep != ',') + if (*sep != ',') { snprintf(ps, sizeof(ps), "noflags"); - COUNTORCAT(s, l, ps, n); + COUNTORCAT(s, l, ps, n); + } if (p->p_flag & P_INMEM) snprintf(ps, sizeof(ps), " %ld,%ld", |