diff options
author | Ryan Zhang <Ryan.Zhang@quantatw.com> | 2016-03-03 11:10:31 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-03-04 11:35:50 -0800 |
commit | 9d472018f90ae95e3919e22124e924eb950e14e4 (patch) | |
tree | c84602c7ba7f4baa78832f58aa40404a095a0cfd | |
parent | 28334368a8185155de6756213d06c0f53093810b (diff) | |
download | chrome-ec-9d472018f90ae95e3919e22124e924eb950e14e4.tar.gz |
Common : Fix ectool led cmd segmentation fault
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>
-rw-r--r-- | util/ectool.c | 2 |
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] = { |