summaryrefslogtreecommitdiff
path: root/usr.bin/systat/sensors.c
diff options
context:
space:
mode:
authorYojiro Uo <yuo@cvs.openbsd.org>2010-04-15 04:57:30 +0000
committerYojiro Uo <yuo@cvs.openbsd.org>2010-04-15 04:57:30 +0000
commit3bed90971d080cedd6a2e02f5d7d2131a1e4a01a (patch)
tree725a6f9f9145cd9d53466ac8183305f340d5dbaa /usr.bin/systat/sensors.c
parent4a51ab87682b0f2a4aff3aaabd39980f48a95184 (diff)
add SENSOR_HUMIDITY to sensor framework to handle humidity values
ok kettenis@ xsa@ sobrado@ krw@ 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 17a8df85639..5d4c2737a59 100644
--- a/usr.bin/systat/sensors.c
+++ b/usr.bin/systat/sensors.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sensors.c,v 1.18 2009/08/14 15:29:19 cnst Exp $ */
+/* $OpenBSD: sensors.c,v 1.19 2010/04/15 04:57:29 yuo Exp $ */
/*
* Copyright (c) 2007 Deanna Phillips <deanna@openbsd.org>
@@ -261,6 +261,9 @@ showsensor(struct sensinfo *s)
case SENSOR_AMPHOUR:
tbprintf("%10.2f Ah", s->sn_value / 1000000.0);
break;
+ case SENSOR_HUMIDITY:
+ tbprintf("%3.2f%%", s->sn_value / 1000.0);
+ break;
default:
tbprintf("%10lld", s->sn_value);
break;