diff options
author | 2017-01-31 21:31:04 +0000 | |
---|---|---|
committer | 2017-01-31 21:31:04 +0000 | |
commit | cf5c5f11fc5561b91c169358b30d3f16a28fbca4 (patch) | |
tree | 96b21c8feb73153861ad86badfcfca0f441e07a1 | |
parent | tweak previous; (diff) | |
download | wireguard-openbsd-cf5c5f11fc5561b91c169358b30d3f16a28fbca4.tar.xz wireguard-openbsd-cf5c5f11fc5561b91c169358b30d3f16a28fbca4.zip |
Don't include a literal "%" in the value for humidity sensorValue in
OPENBSD-SENSORS-MIB, % is the unit for this value and is already present
in sensorUnits, and it's harder for NMS to parse "100.00%" as a number.
From Joel Knight.
-rw-r--r-- | usr.sbin/snmpd/mib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/mib.c b/usr.sbin/snmpd/mib.c index 8a35db9ad6a..f53d9379b07 100644 --- a/usr.sbin/snmpd/mib.c +++ b/usr.sbin/snmpd/mib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mib.c,v 1.82 2017/01/20 09:11:18 claudio Exp $ */ +/* $OpenBSD: mib.c,v 1.83 2017/01/31 21:31:04 sthen Exp $ */ /* * Copyright (c) 2012 Joel Knight <joel@openbsd.org> @@ -2662,7 +2662,7 @@ mib_sensorvalue(struct sensor *s) break; case SENSOR_PERCENT: case SENSOR_HUMIDITY: - ret = asprintf(&v, "%.2f%%", s->value / 1000.0); + ret = asprintf(&v, "%.2f", s->value / 1000.0); break; case SENSOR_DISTANCE: case SENSOR_PRESSURE: |