summaryrefslogtreecommitdiff
path: root/usr.sbin/snmpd/mib.c
diff options
context:
space:
mode:
authorYojiro Uo <yuo@cvs.openbsd.org>2011-09-16 15:44:32 +0000
committerYojiro Uo <yuo@cvs.openbsd.org>2011-09-16 15:44:32 +0000
commita5702831fb2d3d9306138b06c93e7ddec5d1f1a7 (patch)
treeabb0e70b1aa380656b6348da9b262b44b05583ab /usr.sbin/snmpd/mib.c
parent013ecffea263f11694723e5f31b18f9f0b88bad0 (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.sbin/snmpd/mib.c')
-rw-r--r--usr.sbin/snmpd/mib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c
index 9c088a63d03..aa508785ff7 100644
--- a/usr.sbin/snmpd/mib.c
+++ b/usr.sbin/snmpd/mib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mib.c,v 1.45 2011/07/04 04:34:14 claudio Exp $ */
+/* $OpenBSD: mib.c,v 1.46 2011/09/16 15:44:31 yuo Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net>
@@ -1378,6 +1378,7 @@ mib_sensorvalue(struct sensor *s)
case SENSOR_WATTHOUR:
case SENSOR_AMPHOUR:
case SENSOR_LUX:
+ case SENSOR_FREQ:
ret = asprintf(&v, "%.2f", s->value / 1000000.0);
break;
case SENSOR_INDICATOR:
@@ -1398,7 +1399,6 @@ mib_sensorvalue(struct sensor *s)
/* FALLTHROUGH */
case SENSOR_FANRPM:
case SENSOR_INTEGER:
- case SENSOR_FREQ:
default:
ret = asprintf(&v, "%lld", s->value);
break;