diff options
author | Yojiro Uo <yuo@cvs.openbsd.org> | 2010-04-15 04:57:30 +0000 |
---|---|---|
committer | Yojiro Uo <yuo@cvs.openbsd.org> | 2010-04-15 04:57:30 +0000 |
commit | 3bed90971d080cedd6a2e02f5d7d2131a1e4a01a (patch) | |
tree | 725a6f9f9145cd9d53466ac8183305f340d5dbaa /usr.sbin/snmpd/mib.c | |
parent | 4a51ab87682b0f2a4aff3aaabd39980f48a95184 (diff) |
add SENSOR_HUMIDITY to sensor framework to handle humidity values
ok kettenis@ xsa@ sobrado@ krw@ deraadt@
Diffstat (limited to 'usr.sbin/snmpd/mib.c')
-rw-r--r-- | usr.sbin/snmpd/mib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c index c6e29081531..7af24262200 100644 --- a/usr.sbin/snmpd/mib.c +++ b/usr.sbin/snmpd/mib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mib.c,v 1.35 2010/03/31 09:20:23 claudio Exp $ */ +/* $OpenBSD: mib.c,v 1.36 2010/04/15 04:57:29 yuo Exp $ */ /* * Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net> @@ -1378,6 +1378,7 @@ mib_sensorvalue(struct sensor *s) ret = asprintf(&v, "%s", s->value ? "on" : "off"); break; case SENSOR_PERCENT: + case SENSOR_HUMIDITY: ret = asprintf(&v, "%.2f%%", s->value / 1000.0); break; case SENSOR_TIMEDELTA: |