summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2016-10-07 17:10:11 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2016-10-10 16:41:13 +0000
commitfa61526e972e074da18ed96fc5ab26621f0cfab6 (patch)
tree0b1c6ea7d41654306b1fc05e00cb35559de1ad75
parenta32efd5822044a266cb8ac8c6367d43c3cb8e751 (diff)
downloadchrome-ec-fa61526e972e074da18ed96fc5ab26621f0cfab6.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/396128 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--common/host_command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/host_command.c b/common/host_command.c
index a0a7378c8e..49866df14a 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,