summaryrefslogtreecommitdiffstats
path: root/bin/ps/print.c
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2003-08-13 07:35:07 +0000
committerharti <harti@FreeBSD.org>2003-08-13 07:35:07 +0000
commita45a05930d2b1f9bcc8f3fc5ae4028249691198e (patch)
tree50b15bec1993a515aeafe2b43ad02820a92668ca /bin/ps/print.c
parentb3803c0021191a72670403627446abb1eba1ccf9 (diff)
downloadFreeBSD-src-a45a05930d2b1f9bcc8f3fc5ae4028249691198e.zip
FreeBSD-src-a45a05930d2b1f9bcc8f3fc5ae4028249691198e.tar.gz
Implement the nwchan keyword that has been in the man page, but was
not implemented. This is just handy if you want to ddb the address some process is waiting on.
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r--bin/ps/print.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 7700491..7e0f816 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -457,6 +457,19 @@ wchan(KINFO *k, VARENT *ve)
}
void
+nwchan(KINFO *k, VARENT *ve)
+{
+ VAR *v;
+
+ v = ve->var;
+ if (k->ki_p->ki_wchan) {
+ (void)printf("%0*lx", v->width,
+ (long)k->ki_p->ki_wchan);
+ } else
+ (void)printf("%-*s", v->width, "-");
+}
+
+void
mwchan(KINFO *k, VARENT *ve)
{
VAR *v;
OpenPOWER on IntegriCloud