temp_metrics: add "--" when invoking ectool tmp006cal

ectool has switched over to using getopt for command line options parsing.
This breaks temp_metrics' invocation of "ectool tmp006cal" command since
some of the coefficients are negative and therefore start with "-".
getopt treats that as another command line option causing ectool to
barf.

BUG=chromium:422160
TEST=On a Pixel issue "sudo start temp_metrics" and check
/var/log/messages to ensure that no new messages such as "init:
temp_metrics main process ended, respawning" show up.
BRANCH=none

Change-Id: I42232b3027ec6339814d226f1d8ab493e3420eea
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222845
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Sameer Nanda
2014-10-10 08:57:24 -07:00
committed by chrome-internal-fetch
parent b50e5a8b30
commit 63c41f2392

View File

@@ -107,7 +107,9 @@ script
CHARGER_D="3 $CHARGER_D_S0 $B0 $B1 $B2"
for i in "$USB_C" "$PCH_D" "$HINGE_C" "$CHARGER_D"; do
ectool tmp006cal $i
# Add "--" otherwise ectool will barf when trying to parse negative
# coefficients.
ectool tmp006cal -- $i
done
}