summaryrefslogtreecommitdiff
path: root/usr.bin/systat/if.c
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2006-11-28 19:21:17 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2006-11-28 19:21:17 +0000
commit42dc4672e2746e5183c5a29733c654f4a9644cce (patch)
treedf76318348d55acb95fe86483447a0ed376640df /usr.bin/systat/if.c
parent0e1919712e2589382b2029732a09c5ce9488a2cb (diff)
add additional link states to report the half duplex / full duplex
state, if known by the driver. this is required to check the full duplex state without depending on the ifmedia ioctl which can't be called in the kernel without process context. ok henning@, brad@
Diffstat (limited to 'usr.bin/systat/if.c')
-rw-r--r--usr.bin/systat/if.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/systat/if.c b/usr.bin/systat/if.c
index 59980b2d40e..886a959e32e 100644
--- a/usr.bin/systat/if.c
+++ b/usr.bin/systat/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.7 2006/06/02 08:16:51 claudio Exp $ */
+/* $OpenBSD: if.c,v 1.8 2006/11/28 19:21:15 reyk Exp $ */
/*
* Copyright (c) 2004 Markus Friedl <markus@openbsd.org>
*
@@ -206,6 +206,8 @@ showlinkstate(int state)
{
switch (state) {
case LINK_STATE_UP:
+ case LINK_STATE_HALF_DUPLEX:
+ case LINK_STATE_FULL_DUPLEX:
return (":U");
case LINK_STATE_DOWN:
return (":D");