summaryrefslogtreecommitdiff
path: root/sbin
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 /sbin
parent4a51ab87682b0f2a4aff3aaabd39980f48a95184 (diff)
add SENSOR_HUMIDITY to sensor framework to handle humidity values
ok kettenis@ xsa@ sobrado@ krw@ deraadt@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/sysctl/sysctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index cb982fbe583..51d5b4ccf77 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.c,v 1.167 2009/11/05 20:50:14 michele Exp $ */
+/* $OpenBSD: sysctl.c,v 1.168 2010/04/15 04:57:29 yuo Exp $ */
/* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */
/*
@@ -2465,6 +2465,9 @@ print_sensor(struct sensor *s)
case SENSOR_TIMEDELTA:
printf("%.6f secs", s->value / 1000000000.0);
break;
+ case SENSOR_HUMIDITY:
+ printf("%.2f%%", s->value / 1000.0);
+ break;
default:
printf("unknown");
}