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 /sbin | |
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 'sbin')
-rw-r--r-- | sbin/sysctl/sysctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index fe26c1f0107..d01e9c753bd 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.c,v 1.177 2011/07/08 18:30:17 yasuoka Exp $ */ +/* $OpenBSD: sysctl.c,v 1.178 2011/09/16 15:44:31 yuo Exp $ */ /* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */ /* @@ -2463,6 +2463,9 @@ print_sensor(struct sensor *s) case SENSOR_FANRPM: printf("%lld RPM", s->value); break; + case SENSOR_VOLTS_AC: + printf("%.2f ADC", s->value / 1000000.0); + break; case SENSOR_VOLTS_DC: printf("%.2f VDC", s->value / 1000000.0); break; @@ -2535,7 +2538,7 @@ print_sensor(struct sensor *s) printf("%.2f%%", s->value / 1000.0); break; case SENSOR_FREQ: - printf("%lld Hz", s->value); + printf("%.2f Hz", s->value / 1000000.0); break; case SENSOR_ANGLE: printf("%3.4f degrees", s->value / 1000000.0); |