diff options
author | 2004-01-08 09:18:00 +0000 | |
---|---|---|
committer | 2004-01-08 09:18:00 +0000 | |
commit | fe2d8ec1da5c6dec2660dff49ba01aa3a82e9f4c (patch) | |
tree | 1ffb31ecaf3fffd60f3a75c3d92ed2f5f283824e | |
parent | add stub for attribute "sentinel". (diff) | |
download | wireguard-openbsd-fe2d8ec1da5c6dec2660dff49ba01aa3a82e9f4c.tar.xz wireguard-openbsd-fe2d8ec1da5c6dec2660dff49ba01aa3a82e9f4c.zip |
sync with sysctl/drivers + 0K == -273.15C; report grange; ok henning
-rw-r--r-- | usr.sbin/sensorsd/sensorsd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/sensorsd/sensorsd.c b/usr.sbin/sensorsd/sensorsd.c index 5e9e4f42c7d..a3321f9ceaf 100644 --- a/usr.sbin/sensorsd/sensorsd.c +++ b/usr.sbin/sensorsd/sensorsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sensorsd.c,v 1.6 2003/12/22 12:59:45 henning Exp $ */ +/* $OpenBSD: sensorsd.c,v 1.7 2004/01/08 09:18:00 markus Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -216,8 +216,8 @@ print_sensor(enum sensor_type type, u_int64_t value) switch (type) { case SENSOR_TEMP: snprintf(fbuf, RFBUFSIZ, "%.2fC/%.2fF", - (value / 1000 / 1000) - 273.16, - ((value / 1000 / 1000) - 273.16) * 9 / 5 + 32); + (value - 273150000) / 1000000.0, + (value - 273150000) / 1000000.0 * 9 / 5 + 32); break; case SENSOR_FANRPM: snprintf(fbuf, RFBUFSIZ, "%lld RPM", value); |