summaryrefslogtreecommitdiff
path: root/usr.bin/systat/sensors.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-04-20 19:44:08 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-04-20 19:44:08 +0000
commit5d969c87da08e829262bfe79882db0853b92f1ed (patch)
treef456438411ad14c3997c9063058b48055b6a547f /usr.bin/systat/sensors.c
parent1c85972a7a3ee7cb8be67f39e99aadb52d593c74 (diff)
Add "frequency" type for sensors. (and teach userland how to print that
type). Measured in Hz. ok deraadt@
Diffstat (limited to 'usr.bin/systat/sensors.c')
-rw-r--r--usr.bin/systat/sensors.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/systat/sensors.c b/usr.bin/systat/sensors.c
index 5d4c2737a59..e4c9cbe982b 100644
--- a/usr.bin/systat/sensors.c
+++ b/usr.bin/systat/sensors.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensors.c,v 1.19 2010/04/15 04:57:29 yuo Exp $ */
+/* $OpenBSD: sensors.c,v 1.20 2010/04/20 19:44:07 oga Exp $ */
/*
* Copyright (c) 2007 Deanna Phillips <deanna@openbsd.org>
@@ -264,6 +264,9 @@ showsensor(struct sensinfo *s)
case SENSOR_HUMIDITY:
tbprintf("%3.2f%%", s->sn_value / 1000.0);
break;
+ case SENSOR_FREQ:
+ tbprintf("%11lld Hz", s->sn_value);
+ break;
default:
tbprintf("%10lld", s->sn_value);
break;