summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2017-11-10 10:05:33 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-11-11 12:13:42 -0800
commitbce7b5b4b69f5d397f6ee17b0400a31a4d385317 (patch)
treea94d405c2b921b41faf4802d9a556e6d87a7626a /util
parent14ef8d73f1df635c26477687033de3539f6591e9 (diff)
downloadchrome-ec-bce7b5b4b69f5d397f6ee17b0400a31a4d385317.tar.gz
ectool: Print temperature unit in ectool temps output
Currently, 'ectool temps all|<n>' just prints "300". This may easily be mistakenly read as tenth of degree C (30.0 C), as the value appears to make sense (close to room temperature). However, the value is actually 300 K (27 C). CQ-DEPEND=CL:763578 BRANCH=none BUG=chromium:783845 TEST=ectool temps all shows temperature unit (K) Change-Id: I70f7f04d061cb1d4f741d59f8b48c7963dd8280f Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/763996 Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/ectool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/ectool.c b/util/ectool.c
index 03aa6812d1..97f86eb5c2 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -1624,7 +1624,7 @@ int cmd_temperature(int argc, char *argv[])
id);
break;
default:
- printf("%d: %d\n", id,
+ printf("%d: %d K\n", id,
rv + EC_TEMP_SENSOR_OFFSET);
}
}
@@ -1660,7 +1660,7 @@ int cmd_temperature(int argc, char *argv[])
fprintf(stderr, "Sensor not calibrated\n");
return -1;
default:
- printf("%d\n", rv + EC_TEMP_SENSOR_OFFSET);
+ printf("%d K\n", rv + EC_TEMP_SENSOR_OFFSET);
return 0;
}
}