From d4628e2248bac84a74604e837798b68451669eae Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Fri, 7 Oct 2016 17:10:11 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/395490 Commit-Ready: Aseda Aboagye Tested-by: Aseda Aboagye Reviewed-by: Randall Spangler --- common/host_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') 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, -- cgit v1.2.1