mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
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>
This commit is contained in:
@@ -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] = {
|
||||
|
||||
Reference in New Issue
Block a user