diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2004-01-08 09:18:01 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2004-01-08 09:18:01 +0000 |
commit | 6ca3ada111ee9e08d283220dfe2042250d5e1219 (patch) | |
tree | 20174ee6b81141bf4e1ccbcf4cbe0f03063c4788 | |
parent | 662b798520d927038cb2ffc3e1a7662e4e2d22ab (diff) |
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); |