From 6aa88ffa4e6d64a59e5c1d68439ee29d4e8193cc Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Wed, 18 Sep 2013 10:55:11 +0800 Subject: [PATCH] Fix console channel name list This adds back missing "hook" channel name. Also add a build assertion to make sure we don't miss this again. BUG=chrome-os-partner:21801 TEST=Build all boards. Remove "hook" channel and check build fails. BRANCH=None Change-Id: I373016504fd3753e1a791077d49b3af14b2b1aa4 Signed-off-by: Vic Yang Reviewed-on: https://chromium-review.googlesource.com/169703 Reviewed-by: Vincent Palatin Reviewed-by: Randall Spangler --- common/console_output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/console_output.c b/common/console_output.c index 385c48d0af..7f70651f04 100644 --- a/common/console_output.c +++ b/common/console_output.c @@ -18,7 +18,7 @@ static uint32_t channel_mask_saved = CC_DEFAULT; /* List of channel names; must match enum console_channel. */ /* TODO: move this to board.c */ -static const char *channel_names[CC_CHANNEL_COUNT] = { +static const char * const channel_names[] = { "command", "charger", "chipset", @@ -40,7 +40,9 @@ static const char *channel_names[CC_CHANNEL_COUNT] = { "thermal", "usbcharge", "vboot", + "hook", }; +BUILD_ASSERT(ARRAY_SIZE(channel_names) == CC_CHANNEL_COUNT); /*****************************************************************************/ /* Channel-based console output */