diff options
author | Aseda Aboagye <aaboagye@google.com> | 2016-10-07 17:10:11 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-10-10 13:49:37 -0700 |
commit | d4628e2248bac84a74604e837798b68451669eae (patch) | |
tree | 0e8000198a499727c015136e3cca57792ef7c0a5 /common | |
parent | a465405302f382d86ac855c416907d3fabfa1e3f (diff) | |
download | chrome-ec-d4628e2248bac84a74604e837798b68451669eae.tar.gz |
common: Print host command code in error.
For some boards, the HCDEBUG setting is defaulting to off due to "too
spammy" console output. An unfortunate side effect of this is that when
a host command results in an error, it's impossible to know what was the
command that failed.
This commit adds the host command code to the error print so that it's
clear what command failed.
BUG=None
BRANCH=gru,glados,oak
TEST=Build and flash kevin, verify that any host commands that resulted
in an error have the command code printed alongside them.
Change-Id: I6a5f251e7941a47a3cf102a1fb6c5e96ffc8fa5d
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/395490
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/host_command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/host_command.c b/common/host_command.c index 86910499f1..3034419503 100644 --- a/common/host_command.c +++ b/common/host_command.c @@ -597,7 +597,7 @@ enum ec_status host_command_process(struct host_cmd_handler_args *args) } if (rv != EC_RES_SUCCESS) - CPRINTS("HC err %d", rv); + CPRINTS("HC 0x%02x err %d", args->command, rv); if (hcdebug >= HCDEBUG_PARAMS && args->response_size) CPRINTS("HC resp:%.*h", args->response_size, |