summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/ectool.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/ectool.c b/util/ectool.c
index 0fbcafe050..d21bb99fe5 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -221,12 +221,14 @@ const char help_str[] =
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] = {
+static const char * const led_color_names[] = {
"red", "green", "blue", "yellow", "white", "amber"};
+BUILD_ASSERT(ARRAY_SIZE(led_color_names) == EC_LED_COLOR_COUNT);
/* Note: depends on enum ec_led_id */
-static const char * const led_names[EC_LED_ID_COUNT] = {
+static const char * const led_names[] = {
"battery", "power", "adapter"};
+BUILD_ASSERT(ARRAY_SIZE(led_names) == EC_LED_ID_COUNT);
/* Check SBS numerical value range */
int is_battery_range(int val)