diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-04-20 19:44:08 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2010-04-20 19:44:08 +0000 |
commit | 5d969c87da08e829262bfe79882db0853b92f1ed (patch) | |
tree | f456438411ad14c3997c9063058b48055b6a547f /sbin/sysctl/sysctl.c | |
parent | 1c85972a7a3ee7cb8be67f39e99aadb52d593c74 (diff) |
Add "frequency" type for sensors. (and teach userland how to print that
type). Measured in Hz.
ok deraadt@
Diffstat (limited to 'sbin/sysctl/sysctl.c')
-rw-r--r-- | sbin/sysctl/sysctl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 51d5b4ccf77..2dfed0da864 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.c,v 1.168 2010/04/15 04:57:29 yuo Exp $ */ +/* $OpenBSD: sysctl.c,v 1.169 2010/04/20 19:44:07 oga Exp $ */ /* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */ /* @@ -2468,6 +2468,9 @@ print_sensor(struct sensor *s) case SENSOR_HUMIDITY: printf("%.2f%%", s->value / 1000.0); break; + case SENSOR_FREQ: + printf("%lld Hz", s->value); + break; default: printf("unknown"); } |