summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Zhang <Ryan.Zhang@quantatw.com>2016-03-03 11:10:31 +0800
committerChromeOS bot <3su6n15k.default@developer.gserviceaccount.com>2016-04-11 16:31:24 +0000
commit9e87483a60738619a48ef02508c0f918382a688d (patch)
tree12fc9037f812577b401569625f225018c9fcd860
parentbfc855d0fe7d8b3f78412eff43dc62976188522c (diff)
downloadchrome-ec-stabilize-7978.74.B.tar.gz
Common : Fix ectool led cmd segmentation faultstabilize-7978.74.Bstabilize-7978.66.Brelease-R50-7978.B
led_color_names[] should have EC_LED_COLOR_COUNT numbers of data. A missing data cause strcasecmp() compare argv[] with NULL in find_led_color_by_name(), that results in Bundle Image test error BUG=chrome-os-partner:50612 BRANCH=lars TEST=`make -j buildall`, `ectool led power blue=255` with homemade ectool. Signed-off-by: Ryan Zhang <Ryan.Zhang@quantatw.com> Change-Id: I2132775f9d4a074517f9a98b81919dd77bc86102 Reviewed-on: https://chromium-review.googlesource.com/330075 Commit-Ready: David Wu <david_wu@quantatw.com> Tested-by: Ryan Zhang <Ryan.Zhang@quantatw.com> Reviewed-by: Shawn N <shawnn@chromium.org> (cherry picked from commit 9d472018f90ae95e3919e22124e924eb950e14e4) Reviewed-on: https://chromium-review.googlesource.com/332110 Reviewed-by: Wenhao W Li <wenhao.w.li@intel.com> Commit-Queue: Ryan Zhang <Ryan.Zhang@quantatw.com>
-rw-r--r--util/ectool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/ectool.c b/util/ectool.c
index 1a641a931b..98c159cd66 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -222,7 +222,7 @@ static const char * const image_names[] = {"unknown", "RO", "RW"};
/* Note: depends on enum ec_led_colors */
static const char * const led_color_names[EC_LED_COLOR_COUNT] = {
- "red", "green", "blue", "yellow", "white"};
+ "red", "green", "blue", "yellow", "white", "amber"};
/* Note: depends on enum ec_led_id */
static const char * const led_names[EC_LED_ID_COUNT] = {