diff options
author | Yojiro Uo <yuo@cvs.openbsd.org> | 2011-09-16 15:44:32 +0000 |
---|---|---|
committer | Yojiro Uo <yuo@cvs.openbsd.org> | 2011-09-16 15:44:32 +0000 |
commit | a5702831fb2d3d9306138b06c93e7ddec5d1f1a7 (patch) | |
tree | abb0e70b1aa380656b6348da9b262b44b05583ab /usr.bin/systat/sensors.c | |
parent | 013ecffea263f11694723e5f31b18f9f0b88bad0 (diff) |
apply following changes to sensor framework:
- change accuracy of SENSOR_FREQ from Hz to muHz
- add SENSOR_VOLTS_AC entry to userland programs
ok deraadt@
Diffstat (limited to 'usr.bin/systat/sensors.c')
-rw-r--r-- | usr.bin/systat/sensors.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/systat/sensors.c b/usr.bin/systat/sensors.c index 08ec4484a69..1effdbfc14e 100644 --- a/usr.bin/systat/sensors.c +++ b/usr.bin/systat/sensors.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sensors.c,v 1.24 2011/03/02 06:48:17 jasper Exp $ */ +/* $OpenBSD: sensors.c,v 1.25 2011/09/16 15:44:31 yuo Exp $ */ /* * Copyright (c) 2007 Deanna Phillips <deanna@openbsd.org> @@ -224,6 +224,10 @@ showsensor(struct sensinfo *s) case SENSOR_FANRPM: tbprintf("%11lld RPM", s->sn_value); break; + case SENSOR_VOLTS_AC: + tbprintf("%10.2f V AC", + s->sn_value / 1000000.0); + break; case SENSOR_VOLTS_DC: tbprintf("%10.2f V DC", s->sn_value / 1000000.0); @@ -266,7 +270,7 @@ showsensor(struct sensinfo *s) tbprintf("%3.2f%%", s->sn_value / 1000.0); break; case SENSOR_FREQ: - tbprintf("%11lld Hz", s->sn_value); + tbprintf("%11.2f Hz", s->sn_value / 1000000.0); break; case SENSOR_ANGLE: tbprintf("%3.4f degrees", s->sn_value / 1000000.0); |